Theme installation requires that you have the ability to move files from your local machine on to your server. Typically, this is done with an FTP client or through your web hosting control panel. The method you use is up to you. It makes no difference to Drupal which method you choose to employ.
Odds are your theme was delivered to you as a single file containing a compressed archive of files. When I downloaded Zen, above, I wound up with the file zen-6.x-1.0-beta2.tar.gz. The .tar.gz format (a.k.a. "tarball") is one of several commonly used archive formats.
The first step towards getting the theme installed is to uncompress the archive. Double-click the tarball and one of two things will happen: Either the file will uncompress and leave you with a new folder named "zen" or your system will prompt you to look for an application to open the archive file. In the latter case, you will need to track down and install a file compression program. There are lots of good ones out there. Most users, however, should have no problems as compression software is installed on many systems these days.
The next step is to get the extracted files up to your server. Use whatever means you prefer (FTP, control panel, etc.) to gain access to the directories of your Drupal site on the server.
Once you have access to your server, navigate to the directory sites/all; this is where you should place all third-party themes and extensions.
A note for old Drupal hands: The use of the sites/all directory is a change that was implemented in the version 5.x family. Using the sites/all directory, instead of the traditional themes directory, allows you to run multiple sites off a single Drupal installation. Placing all your extensions inside the sites/all directory means less complication with future upgrades.
Inside the sites/all directory, create a new subdirectory and name it themes. This new themes directory is where you will place all additional theme files. Finally, copy the zen directory and its contents inside sites/all/themes. Each theme should be kept in a separate directory. In this case, you should have wound up with a directory structure like this: sites/all/themes/zen.
README.txt ▼ LH themes > CJ zen ► LH default n themes update.php
Dec 23, 2006, 11:35 PM 4KB Plaintext
Create the sites/all/themes directory to store the Zen theme files.
If all has gone according to plan, you are now ready to close the connection to your server and visit the admin interface of your Drupal site.
For the next steps, access the admin interface to your site via your browser and go to the theme manager (Administer | Site building | Themes). You should see your new theme listed alphabetically in the list of themes, as per the following illustration:
The theme manager provides a list of all the themes available on your site. Note the Enabled checkbox and the Default radio button; these controls are key to activating and configuring a theme for display on the site.
To use the new theme, we must first enable it. Once the theme is enabled, we can assign it to appear where we wish, and configure it.
To enable Zen, select the Enabled checkbox to the right of the theme name. Once you've selected Enabled, then click the Save configuration button at the bottom of the screen. Note that the appearance of the site does not change—that is because the new theme is neither assigned to any pages (nodes) nor is it set as the default.
Next, let's assign the theme to appear where we want. In this case, I want Zen to appear throughout the site, so I am going to select the Default radio button. The Default control is important; it sets the primary theme—the default theme—for the site. The default theme will be used by the system in all situations in which another theme is not specified. If we click the Default radio button next to our new theme and click Save configuration, the theme will be applied immediately, for both the front end and the back end (Admin system) of the site.
It is possible to override the default application of a theme to the back end I of the site by specifying a separate theme for the administration system. I
This topic is dealt with in Chapter 8. I
Note that you can enable more than one theme at a time. By enabling more than one theme, another function becomes possible. Registered visitors can choose which theme to use when they view the site. When multiple themes are enabled, a registered user can pick a theme as their default theme and the system will remember their choice.
When the multiple theme function is active, site visitors can select their preferred theme via the Theme configuration preferences on the edit tab of the My account page. The administrator can disable this functionality on the User Permissions page (Administer | User management | Permissions). _
Note that once you enable a theme, another choice appears on the theme manager interface. Enabling a theme causes the configure option to become active (it will appear to the right of the Default radio button in the column labeled Operations). The Configuration Manager provides access to both global configuration options and theme-specific settings. In the next section, we take a look at both.
Was this article helpful?