1

Pretty new to drupal. I will have roughly seven themes and looking for the best way to change themes by url... xxxx.com/parents = one theme xxxxx.com/edu be another theme xxxx.com/daily will be another theme. There will be about 7 different themes all together. What is the best way to way to make this happen.

Thank you

1

You can do this by using the following ways.

  1. Use the ThemeKey module

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.

  1. Add the following code to your settings.php

     $theme_urls = array(
       array('/admin','garland'), // Drupal already supports admin theme, anyway
       array('/users','fancy_user_theme'),
       array('/forum','forums_theme'),
    );
    
    foreach ( $theme_urls as $info) {
      if (strpos($_SERVER['REQUEST_URI'], $info[0]) === 0) {
        $conf['theme_default'] = $info[1];
      }
    }
    

Not the answer you're looking for? Browse other questions tagged or ask your own question.