I desired a module to allow theme switching and special node type assignments. I wanted to have a splash page that led to two different looking sites even though it was one master site.
Drupal core doesn't yet have this feature built in like other CMS's do. ThemeKey to the rescue!
Themekey http://drupal.org/project/themekey (theme switching module) also has Themekey properties http://drupal.org/project/themekey_properties so for those who desire granularity to the insane level, you have that option.
What Themekey can do:
As one is creating content, one can select which loaded-enabled theme/template to have the node load. So in effect if you have 40-50 nodes (types are irrelevant-any will work) you could use 40-50 different themes. I agree that is a dramatic example but one could if one wanted to.
Additionally one can schedule themes to switch which is great for e-commerce sites (bloggers, etc) who wish to theme various seasonal pages/nodes to theme one way this quarter/season and then something else next quarter/season.
Or, as in my current situation, make the site look like multiple sites versus actually creating a multi-site using Drupal's multi-site capabilities.
Because my Drupal gurus will be reading this
(Hello Scott and Andy!)
There are many a reason to use the Multi-site capabilities that Drupal core provides. One such use case is you desire to have separate databases to manage with different settings etc. Another is to avoid user accounts being able to pass between the sites(?), so if granularity (finite control) is desired-go Multi-site.
In my simple site case, I really only need to present different themes so visitors will have a theme flow so they will subliminally know where they are (which 'side') at any given moment. Since the site will have two different appeals/sunbjects, this is critical for presentation (in my mind at least).
Hope this leads you to a great solution as it did for me.
Comments
Thanks.
Christopher, thanks for the write-up. I appreciate you sharing personal experience with your Drupal (and other web) work.
A few months back, Andy presented briefly on the Context module. Thought I've not used it very much, I believe it can provide theme-switching as well.
-Scott
Scott Rouse
http://about.me/scott.rouse
Good to know!
Thanks Scott, I believe I missed that session. As with other types of functionality I would not be surprised there are a few modules that overlap this area.
One note I just recalled is that folks get to be careful with this module in at least one respect. If one uploads a broken theme and switches the site to it, bad news as one may 'lose' the site. It is recommended to try out the theme on one node first (not the front page-home page) then commit to that theme after it is proven decent code.
Cheers,
Christopher
Can do this with Context
To Scott's point, you can also do this with the Context module and the Context Reaction: Theme module:
http://drupal.org/project/context
http://drupal.org/project/context_reaction_theme
If you're already using Context in your site (and you should, it 'fixes' the way Drupal does block display logic), this provide be all you need, and obviate the need to add another module (ThemeKey) to your site.
Be careful not to overeat at the 'contrib-module buffet'!
ThemeKey looks good
Thanks for this Christopher, I was unaware of this module, and it looks like it's actively maintained and used on 3000+ Drupal installs, which seems quite solid. I haven't installed it or tried it but the concept looks sound.
I just want to clarify a little about Drupal multi-site vs. multiple themes: the two are pretty much unrelated. Multisite gives you a lot of flexibility to run completely separate sites (separate modules, themes, and databases) from the same Drupal core install, or more advanced scenarios, like a network of sites that have separate modules, content, and themes, but SHARE the same user database, so a user with an account on one site automatically has login on all the others. HOWEVER you could have a multisite setup where each site used the same theme.
Within a single site, Drupal has long supported switching themes around. There's an option (little-used) to let individual users pick their own theme from a list of admin-enabled themes. And there have been little tricks and code snippets for years to switch the theme on the fly based on certain criteria. Sounds like ThemeKey has wrapped up these tricks into one nice module.
One last note: often you want a different layout for your home page (or other special pages) than the rest of the site, but you really do want the same theme (colors, typography, etc.) There are many ways to do this (Panels module is a popular one) but you can also do it by specifying an alternate page template file for the homepage. So the standard page template file for the theme would be typically page.tpl.php, you could just copy that to page-front.tpl.php and edit it to get the alternative layout you need.
Anyway, good find!
All excellent points.
Great points Andy, many thanks for separating out the differences.
I miss-communicated the purpose or scope of why I wanted a module like Themekey. Basically I didn't want to create multiple sites but did want the same effect as having separate sites to visitors. The separation would come in themes and of course tweaking what content-blocks showed up where.
I have planned to use the same header/logo combination as the cap stone to the site but just about every other part I do want separation. All that with a main Splash page that leads to two different 'sections' thereby appearing as if it were one for, let's say Vacations and the other for Culinary adventures or schools.
I didn't want to leave out Multi-site because someone may read my original post and they may not be aware of that capability.
Thanks to you both for much needed support, guidance and keeping me and many others on track!