Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Themes

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Child / dependent themes - anyone know this?


Reply

3 Posts   726 Views

Avatar
KINKCreative

12 October 2011 at 3:14pm Community Member, 56 Posts

I recall vaguely an article from years ago that explained we could develop dependent themes. E.g. one theme that inherits from another, and you would then only change certain files, while keeping the main theme as the basis. I am pretty certain it had to do with SS. Does anyone remember this? I googled back and forth and I'm not hitting anything.

Hereby I don't mean a "subtheme" for a module, but e.g. a theme that is derived from a main theme, but has a different look (e.g. different CSS's).

Avatar
Willr

17 October 2011 at 10:30am Forum Moderator, 5511 Posts

AFAIK inheritance isn't supported more than subthemes. You can also use the fact that if no theme contains the file mysite/templates is used so your 'base' could be mysite/templates/ then subthemes to themes/yourtheme

Avatar
Futureweb

10 February 2012 at 12:50pm Community Member, 233 Posts

You can can use sub themes. They are not just for modules, they can be used to take a theme, and extend it for any page type. By using myTheme_page you can basically create a child theme that extends your master theme...

I've put some notes on this at [url]http://www.silverstriperesources.com/articles/customising-a-theme-using-sub-themes/[/url]