Drupal Module of the Month : ThemeKey

You may spend 3 years trying to write a module that loads different template based on url or aliases. Or you may read Drupal API documentation trying to figure out how theming works in Drupal. There is a module that can do theme switching for you… Enter Drupal Project: ThemeKey. Read description below:

ThemeKey allows you to define simple or sophisticated theme-switching rules which allow automatic selection of a theme depending on current path, taxonomy terms, language, node-type, and many, many other properties. It can also be easily extended to support additional properties exposed by other modules. In combination with Drupal’s theme inheritance and ThemeKey Properties you can easily achieve features like:

  • individually-styled channels
  • a front-page / “splash” screen
  • a date/time-selected Christmas theme
  • mobile themes for different auto-detected mobile devices
  • special themes for “limited” or “old” browsers
  • content, user, or role -specific themes
  • indicating your environment (production, staging, testing, sandbox, … )
  • testing your redesign safely on a live server

And unlike other theme switching modules, ThemeKey should play well with internal and external page caches, like Boost or Varnish, even for anonymous users.

Why spend hours thinking how to load theme based on url or aliases when you have ThemeKey to do this for you. OUM Digital Library Portal uses ThemeKey to load different theme for mobile user. Combination of WURFL, Drupal Project: Mobile Tools, and ThemeKey can make your Drupal Experience much more better. Below is the example of ThemeKey Administrative page:

[img_assist|nid=510|title=|desc=|link=node|align=none|width=400|height=173]

 

 

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.