Search code examples
drupaldrupal-7drupal-modulesdrupal-theming

Drupal 7 change theme for module


I have created a new module based on the Extensible Wizard Example found in http://drupal.org/project/examples. This is a one of 5 form modules which will all run on the same drupal site.

I need all 5 modules to use different themes but cannot figure out how to set a theme on the module level.

I have tried the suggestions in Drupal: How to theme a module and Drupal theme functions workflow in module with no success.

Any ideas?


Solution

  • to do this programatically, you can use the themekey module api, as explained in this post: http://drupal.org/node/622450

    Also there are several modules that would help with switching themes based on different circumstances from the frontend:

    Themekey: http://drupal.org/project/themekey

    Page Theme: http://drupal.org/project/page_theme

    Content Theme: http://drupal.org/project/content_theme

    There is also role theme switcher and some others