From 39fac21fb99f4d67d29d40f448fc57093ade665f Mon Sep 17 00:00:00 2001 From: Jeremy Shipman Date: Thu, 26 Feb 2015 12:51:27 +1300 Subject: [PATCH] Explain the module specific themes separation capability of Silverstripe Relates to #3944 --- .../01_Templates/05_Template_Inheritance.md | 7 +++--- .../01_Templates/06_Themes.md | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/en/02_Developer_Guides/01_Templates/05_Template_Inheritance.md b/docs/en/02_Developer_Guides/01_Templates/05_Template_Inheritance.md index b6d3b8295..844d93348 100644 --- a/docs/en/02_Developer_Guides/01_Templates/05_Template_Inheritance.md +++ b/docs/en/02_Developer_Guides/01_Templates/05_Template_Inheritance.md @@ -46,9 +46,10 @@ your entire project for the appropriate `.ss` files located in `template` direct It will each and prioritize templates in the following priority: 1. mysite (or other name given to site folder) -2. themes -3. modules -4. framework. +2. module-specific themes (e.g. themes/simple_blog) +3. themes (e.g. themes/simple) +4. modules (e.g. blog) +5. framework
Whenever you add or remove template files, rebuild the manifest by visiting `http://yoursite.com/?flush=1`. You can diff --git a/docs/en/02_Developer_Guides/01_Templates/06_Themes.md b/docs/en/02_Developer_Guides/01_Templates/06_Themes.md index d497d4bf5..7f6d44325 100644 --- a/docs/en/02_Developer_Guides/01_Templates/06_Themes.md +++ b/docs/en/02_Developer_Guides/01_Templates/06_Themes.md @@ -47,6 +47,30 @@ located within the `themes` directory. ![themes:basicfiles.gif](../../_images/basicfiles.gif) +Your theme can also be organised into split folders for each module it caters for. + +``` +themes + blackcandy + css + style.css + images + templates + Page.ss + Layout + Page.ss + Includes + blackcandy_blog + css + blog.css + images + templates + Layout + BlogHolder.ss + BlogEntry.ss + Includes +``` + ## Submitting your theme to SilverStripe If you want to submit your theme to the SilverStripe directory then check