1 Full documentation on the Zen theme can be found in Drupal's Handbook:
2 http://drupal.org/node/193318
4 Excellent documentation on Drupal theming can be found in the Theme Guide:
5 http://drupal.org/theme-guide
10 1. Download Zen from http://drupal.org/project/zen
12 2. Unpack the downloaded file, take the entire zen folder (which includes
13 the README.txt file, a zen_classic folder, etc.) and place it in your
14 Drupal installation under one of the following locations:
16 making it available to the default Drupal site and to all Drupal sites
17 in a multi-site configuration
19 making it available to only the default Drupal site
20 sites/example.com/themes
21 making it available to only the example.com site if there is a
22 sites/example.com/settings.php configuration file
24 3. Log in as an administrator on your Drupal site and go to Administer > Site
25 building > Themes (admin/build/themes) and make Zen or one of its
26 sub-themes the default theme.
28 Build your own sub-theme:
30 IMPORTANT: In Drupal 6, the theme system caches template files and which theme
31 functions should be called. What that means is if you add a new theme or
32 preprocess function to your template.php file or add a new template (.tpl.php)
33 file to your sub-theme, you will need to rebuild the "theme registry."
34 See http://drupal.org/node/173880#theme-registry
36 The base Zen theme is designed to be easily extended by its sub-themes. You
37 shouldn't modify any of the CSS or PHP files in the zen/ folder; but instead
38 you should create a sub-theme of zen which is located in a folder outside of
39 the root zen/ folder. The examples below assume zen and your sub-theme will be
40 installed in sites/all/themes/.
42 Why? To learn why you shouldn't modify any of the files in the zen/ folder,
43 see http://drupal.org/node/245802
45 1. Copy the STARTERKIT folder out of the zen/ folder and rename it to be your
46 new sub-theme. IMPORTANT: Only lowercase letters and underscores should be
47 used for the name of your sub-theme.
49 For example, copy the sites/all/themes/zen/STARTERKIT folder and rename it
50 as sites/all/themes/foo.
52 Why? Each theme should reside in its own folder. Unlike in Drupal 5,
53 sub-themes can (and should) reside in a folder separate from their base
56 2. In your new sub-theme folder, rename the STARTERKIT.info.txt file to
57 include the name of your new sub-theme and remove the ".txt" extension.
58 Then edit the .info file by changing any occurrence of STARTERKIT with the
59 name of your sub-theme and editing the name and description field.
61 For example, rename the foo/STARTERKIT.info file to foo/foo.info. Edit the
62 foo.info file and change "STARTERKIT.css" to "foo.css", change "name = Zen
63 Themer's Starter Kit" to "name = Foo", and change "description = Read..."
64 to "description = A Zen sub-theme".
66 Why? The .info file describes the basic things about your theme: its
67 name, description, features, template regions, CSS files, and JavaScript
68 files. See the Drupal 6 Theme Guide for more info:
69 http://drupal.org/node/171205
71 3. If you want a liquid layout for your theme, copy the layout-liquid.css from
72 the zen/zen folder and place it in your sub-theme's folder. If you want a
73 fixed-width layout for your theme, copy the layout-fixed.css from the
74 zen/zen folder and place it in your sub-theme's folder. Rename the layout
75 stylesheet to "layout.css".
77 For example, copy zen/zen/layout-fixed.css and rename it as foo/layout.css.
78 Note that the .info file already has an entry for your layout.css file.
80 Why? In Drupal 6 theming, if you want to modify a stylesheet included
81 by the base theme or by a module, you should copy the stylesheet from the
82 base theme or module's directory to your sub-theme's directory and then
83 add the stylesheet to your .info file. See the Drupal 6 Theme Guide for
84 more info: http://drupal.org/node/171209
86 4. Copy the zen stylesheet from the zen folder and place it in your
87 sub-theme's folder. Rename it to be the name of your sub-theme.
89 For example, copy zen/zen/zen.css and rename it as foo/foo.css. Note that
90 the .info file already has an entry for your foo.css file and that your
91 .info file removes the base theme's zen.css file.
93 5. Copy the print stylesheet from the zen folder and place it in your
96 For example, copy zen/zen/print.css to foo/print.css. Note that the .info
97 file already has an entry for your print.css file.
99 6. Copy the html-elements stylesheet from the zen folder and place it in your
102 For example, copy zen/zen/html-elements.css to foo/html-elements.css. Note
103 that the .info file already has an entry for your html-elements.css file.
105 7. Edit the template.php and theme-settings.php files in your sub-theme's
106 folder; replace ALL occurrences of "STARTERKIT" with the name of your
109 For example, edit foo/template.php and foo/theme-settings.php and replace
110 "STARTERKIT" with "foo".
112 8. Log in as an administrator on your Drupal site and go to Administer > Site
113 building > Themes (admin/build/themes) and enable your new sub-theme.
117 9. MODIFYING ZEN CORE STYLESHEETS:
118 If you decide you want to modify any of the other stylesheets in the zen
119 folder, copy them to your sub-theme's folder before making any changes.
120 Also, be sure the new stylesheet is included in your .info file and that
121 you have rebuilt the theme registry.
123 For example, copy zen/zen/block-editing.css to foo/block-editing.css. Then
124 edit foo/foo.info and uncomment this line to activate it:
125 ;stylesheets[all][] = block-editing.css
127 stylesheets[all][] = block-editing.css
129 10. MODIFYING ZEN CORE TEMPLATE FILES:
130 If you decide you want to modify any of the .tpl.php template files in the
131 zen folder, copy them to your sub-theme's folder before making any changes.
132 And then rebuild the theme registry.
134 For example, copy zen/zen/page.tpl.php to foo/page.tpl.php.
136 11. THEMEING DRUPAL'S SEARCH FORM:
137 Copy the search-theme-form.tpl.php template file from the modules/search/
138 folder and place it in your sub-theme's folder. And then rebuild the theme
141 You can find a full list of Drupal templates that you can override on:
142 http://drupal.org/node/190815
144 Why? In Drupal 6 theming, if you want to modify a template included
145 by a module, you should copy the template file from the module's
146 directory to your sub-theme's directory and then rebuild the theme
147 registry. See the Drupal 6 Theme Guide for more info:
148 http://drupal.org/node/173880
150 12. FURTHER EXTENSIONS OF YOUR SUB-THEME:
151 Discover further ways to extend your sub-theme by reading Zen's
152 documentation online at:
153 http://drupal.org/node/193318
154 and Drupal 6's Theme Guide online at:
155 http://drupal.org/theme-guide