TITNFE: Template in theme not found error
Sometimes your template in your theme is not found. Why?
You have a module and want to overwrite the template in your theme. No problem, works out of the box, cause theme specific templates overrule module templates. That's fine.
But when your module is "mysite" (or whatever you set as $project in your _config.php), it doesn't work. Because SS_TemplateManifest's method getCandidateTemplate() returns the templates in the following order of importance:
- project code (e.g. in mysite)
- current theme
- and finally modules
So either put your code and the "global" templates (valid for all themes if not overwritten in the theme) in a seperate module or just move the templates to your theme. But a template in mysite/templates/ is just Stumpf...
Post your comment
Comments
Loz Calver 22/02/2017 11:43am (8 years ago)
Worth noting that (in 3.x at least), CompositeField.ss is never actually used. CompositeField_holder.ss does everything
No one has commented on this page yet.
RSS feed for comments on this page | RSS feed for all comments