It would be great (and maybe it's alreasy possible) if stylesheets could be shared among multiple subthemes. I need this to apply different subthemes for site-sections and activate them with themekey module.
e.g. a youthsection on a churchpage could have a different look / sphere. A lot of styling will be the same, so I do not want to make the changes in all the subthemes.
If it is already possible, could you please give me a hint how to accomplish this.
If not, consider this as a feature-request please.

Comments

rhache’s picture

Hi flodo,

At this juncture, this is how I would tackle this problem:

  1. Create a regular LayoutStudio sub-theme. Let's call it "common", since it will contain the common CSS stylesheets
  2. Remove all of the CSS files in the CSS directory, and add a common.css file
  3. In the common.info file, remove all other stylesheets, and add a line for the new common.css.
  4. Create all the sub-themes you need. For example, you mentioned a youth section, so perhaps a "youth" theme.
  5. Whenever you create a sub-theme, change one setting in the info file that is not in the instructions: change the base theme from "layoutstudio" to "common"

I don't want to judge how good your skills as a themer are, but you should keep in mind that there is a general tendency to want to use new themes for site sections too quickly, without really using the theme's features to it's full potential. A few of examples of what I mean:

  • Use the section body class: for example, if you have a "youth" section to your site, and everything that belongs in that section has "youth" at the beginning of it's path alias (ie mysite.com/youth/blog/blog-post-title), then you can utilize the "section-youth" body class that LayoutStudio provides.
  • If you need to change the layout per site section, the LayoutStudio Extras module can do that for you.
  • Create your own body class in a page preprocess function, or insert stylesheets dynamically based on page context.

Hopefully this points you in the right direction. Let me know if you get stuck somewhere.

thanks,
Rene

rjay’s picture

Status: Active » Closed (works as designed)