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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Themes /

Discuss SilverStripe Themes.

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

Child / dependent themes - anyone know this?


Go to End


3 Posts   2044 Views

Avatar
DesignCollective

Community Member, 66 Posts

12 October 2011 at 3:14pm

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

Forum Moderator, 5523 Posts

17 October 2011 at 10:30am

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
JonShutt

Community Member, 244 Posts

10 February 2012 at 12:50pm

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 http://www.silverstriperesources.com/articles/customising-a-theme-using-sub-themes/