Setting up a CiviCRM theme in Drupal
CiviCRM administration screens take up a lot of browser real estate. How CiviCRM looks is determined by what themes you are using in your CMS. Problems arise when you use your main website theme to display CiviCRM pages. All the customizations, blocks of information, and layouts suddenly get in the way when you want to administer CiviCRM. The trick is to use a different theme for CiviCRM.
How to do it…
This is very easy to accomplish, and just uses a configuration screen in Drupal.
- Make sure you have the CiviCRM theme module enabled.
- Navigate to
admin/appearance
in Drupal by clicking on the Appearance button. This page shows the themes that are currently installed within our CMS—in this case, Drupal. - Make sure that any themes you wish to use are enabled.
- At the foot of the screen, configure CiviCRM Administration theme.
How it works…
Drupal uses the page URL to check if you are administering CiviCRM. If you are, the pages are displayed using the CiviCRM administration theme.
It's a good idea to select a flexible-width theme with sidebars. Garland is a good example. The flexible width accommodates CiviCRM displays nicely.
Once the administration theme is selected, navigate to admin/structure/blocks
. Here you will see various blocks provided by the CiviCRM module. You can now place these blocks within your administrative theme.
Pay special attention to the visibility settings for these blocks, so that they only appear when using CiviCRM.
There's more…
In Drupal, there is an additional setting that controls which theme is used to display public CiviCRM pages, for example, event sign-up pages.
See also
- You can explore hundreds of contributed Drupal themes at http://drupal.org/project/themes