WorkHabit Blogs

WORKHABIT LABS

Multiple Themes on your Drupal Install

by Nicholas Russell Published: December 3rd, 2008
Tagged: Drupal, drupal, multiple sites, multiple themes, settings.php, theming

I was just encountered with the need to have a multi-site drupal install which utilized a specific theme for each site. In a lot of cases, multi-sites are set up on one drupal install, but utilize individual databases for each site. This is done by setting $db_url in settings.php to point to the database to be used for each site.

In our case, we needed to have a multi-site platform on one drupal install using only one database, but each site needed to display its own theme. This is accomplished by modifying each settings.php file for each site and un-commenting the following code.

<?php
# $conf = array(
#   'site_name' => 'My Drupal site',
#   'theme_default' => 'minnelli',
#   'anonymous' => 'Visitor',
# );

In our case, we only needed to set the 'theme_default' option for our settings and removed 'site_name' as well as 'anonymous'. Be sure to activate your themes in admin/build/themes by checking them On. This will allow you to set the 'theme_default' by specifying the theme name in each settings.php file.

Also, to keep with the "Drupal Way", make sure you place each theme for each site inside of a themes directory inside its site directory.

Example: sites/oneofmysites.com/themes/theme-directory

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h3>
  • You can use Markdown syntax to format and style the text.

More information about formatting options

Papernote
Papernote

WorkHabit Labs Archives