Page based theming?

Feb 7, 2011 at 3:20 PM

Would it be possible to select different themes on a per page basis?

I see that right now the theme is applied to the "public"pages but not the pages in the "dashboard" so there must be some logic to control what theme is applied.

Page based theming would facilitate such things as different layouts, fonts, colors etc on various pages.

Feb 7, 2011 at 5:41 PM

Absolutely. Actually I'm writing a module right now that makes that sort of thing even easier. Should be online today or tomorrow.

The main idea is to implement IThemeSelector. You get the RequestContext as a parameter for GetTheme so you can look at the route data in there and make a decision what theme to return based on it.

Feb 7, 2011 at 8:43 PM
Hi Bertrand,
I usually know what layout I want for a url at design time.
Did you consider adding a Dropdown to the Content Item Layout as part of the route part to avoid some runtime execution?
And what is the name of the that Module?
Feb 7, 2011 at 8:48 PM

We used to have such a dropdown but had to remove it at some point for technical reasons. We never had time to bring it back but it should be fairly easy to build as a module.