Details
-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
1.0.7
-
None
-
None
Description
The prerequisite for page definitions (as well as component definitions) is to be somewhere under a folder/contentNode 'templates', which is right below the (light-)module.
The new Template Availability Features 'enableAll' and 'enableAllWithRenderType' introduce the new requirement of page definitions being under a 'pages' folder/contentNode, which requires to be right below the mentioned 'templates' folder/contentNode.
Therefore <module-name>/templates/pages/someTemplateId will work while <module-name>/templates/some/folder/structure/someTemplateId will not.
This additional requirement is hard coded in info.magnolia.module.site.templates.ConfiguredSiteTemplateAvailability#142:
StringUtils.substringAfter(templateDefinition.getId(), ":").startsWith("pages/")
I see not valid reason for creating any further (not backwards compatible) conventions like this. Same goes for components, which hopefully never have to be in a 'components' folder to be "fully functional". Therefore i hope, that this new 'convention' is removed again.