Make a Copy of the Theme

The first step in customizing a theme is to make a copy of it and place it into the appropriate location in the sites directory. Think of the sites directory as "the stuff that makes your site yours." All of your customizations, installed modules, and themes should go into this directory. For most sites, this will mean placing themes into sites/ all/themes. Drupal will discover themes within subdirectories, so feel free to organize this however you like.

1. Ensure that sites/all/themes exists and copy the bluemarine directory into it.

2. Rename the new directory from bluemarine to newmarine.

3. Rename the bluemarine.info file to newmarine.info.

4. Open newmarine.info into a text editor and edit the file to reflect the new name. This is the information that will appear on the theme listing page in Dru-pal administration:

name = Newmarine description = Table-based multi-column theme based on Bluemarine. version = VERSION core = 6.x engine = phptemplate

You will notice that at the top of files you download from Dru-pal.org there is always a line commented out that starts with $Id:, with a name and some date information that follows after. This is a special ID tag used by the version control system used by Drupal.org (CVS) to maintain all of the core and contributed code. Your custom files don't need this line on them but it doesn't hurt to have it there either. If you do ever decide to contribute your work back to the community, you will need to make sure all of your files start with that line. The empty version of this string is simply $Id$.

5. Visit the Drupal theme administration page (AdministersSite buildings-Themes (admin/build/themes), and enable the new theme by clicking the "Default" radio button next to it, as seen in Figure 11-7. Click "Save configuration" to switch the theme.

Version Enabled Default Operations

Bluemarine

,J Table-based multi-column theme with a 6.4

O

" "; ."":";.r.J marine and ash color scheme.

Minimalist tabled theme with light colors.

Chameleon

Minimalist tabled theme with light colors.

Garland

Tableless, recolarable, multi-coium fluid width theme (default).

Marvin

Boxy tabled theme in all grays.

Marvin

Boxy tabled theme in all grays.

Tableless, reeolorable, mutti-column, fixed width theme.

6.4

Table-based multf-column theme with a 6.4

Ss marine and ash color scheme.

Newmarine

Table-based multf-column theme with a 6.4

Ss marine and ash color scheme.

Pushbutton

Tabled, multi-column theme in blue 6.4 —■and orange tones.

Figure 11-7. Selecting Newmarine as the default theme

You should see your new theme on the site now. Right now it looks just like Bluemarine, but we're going to change that momentarily.

The last thing we want to do before we jump into theming is get some content on the site so we can see how things are changing:

1. Go to go Administers Site buildings-Modules (admin/build/modules) and enable the following module:

• Development package

— Devel generate

2. Go to AdministersGenerate items (admin/generate) and click the "Generate categories" link. We'll make categories first so that they can be assigned to the nodes we'll make in the next step.

3. The defaults are fine for our purposes, so just click the "Do it!" button to make the categories.

4. Return to AdministersGenerate items (admin/generate) and click the "Generate content" link. For this one, most of the defaults are fine, but we want to add a few things to our content.

5. In the "How many comments per node would you like to generate?" text box, enter "100," so that we can see how comments will look on the site, too.

6. We also want to use our taxonomy terms, so check off the "Add taxonomy terms to each node" box.

7. Click "Do it!" and you will have a nicely populated site to work with.

0 0

Post a comment