/
Two links show same homepage [5.2.2-B1]
Two links show same homepage [5.2.2-B1]
Each template in theme can be accessed using 2 urls:
- url that exactly specifies template name (for "/themes/theme_name/path/to/template.tpl" template it would be "/path/to/template.html" url)
- url that is built according to template linked category placement in "Structure & Data" section
This is already bad (from SEO point), that same page can be accessed using 2 urls, but it can get worse. For example the "index.tpl" file in theme that shows homepage has "/home.html" url because page name in that template is set to "Home" which automatically produced "home" in the url.
This problem can be solved by hand by unchecking "Auto Create File Name" checkbox and entering "index" instead of "Home" in the "Filename" field:
It does work, but is easy to forget to do on every project.
Solution
During missing category creation while theme is being scanned add code, that for "/index.tpl" template specifically would uncheck "Auto Create File Name" checkbox and set "Filename" to "index".