Reputation: 175
I have to change the templates of the blogging module of SilverStripe.
I can do this in the blog/templates directory, but when I want to update this module my changes are lost.
I read about template overriding here: http://doc.silverstripe.org/framework/en/topics/theme-development.
The page says that by creating the file BlogHolder.ss
in the directory \mysite\templates\Layout
should override the template in the blog module. This isn't working. However a CSS works and is overridden.
How can I solve this problem?
Upvotes: 1
Views: 517
Reputation: 623
You should put your theme into a separate directory from your project. The only templates you should really put into your project folder are default templates that can be overwritten by a theme.
The order in which SilverStripe looks for templates is:
Your BlogHolder.ss file should be placed in /themes/mytheme/templates/Layout/BlogHolder.ss
Upvotes: 3