| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 // $Id: README.txt,v 1.1.2.1 2009/08/14 14:43:23 kehan Exp $ 2 This theme is a subtheme of the excellent Zen Theme which is available at 3 http://drupal.org/project/zen 4 5 Most of this documentation is adapted from the zen README.txt 6 7 Full documentation on the Zen theme can be found in Drupal's Handbook: 8 http://drupal.org/node/193318 9 10 Excellent documentation on Drupal theming can be found in the Theme Guide: 11 http://drupal.org/theme-guide 12 13 14 Installation: 15 16 1. Download Zen from http://drupal.org/project/zen 17 18 2. Unpack the downloaded file, take the entire zen folder and place it in your 19 Drupal installation under one of the following locations: 20 sites/all/themes 21 making it available to the default Drupal site and to all Drupal sites 22 in a multi-site configuration 23 sites/default/themes 24 making it available to only the default Drupal site 25 sites/example.com/themes 26 making it available to only the example.com site if there is a 27 sites/example.com/settings.php configuration file 28 29 3. Download the GBIF theme from http://drupal.org/project/gbif 30 31 4. Unpack the downloaded file and unzip it within the zen folder in your themes folder 32 33 5. Log in as an administrator on your Drupal site and go to Administer > Site 34 building > Themes (admin/build/themes) and enable the GBIF sub Theme 35 36 37 Build your own sub-theme: 38 39 IMPORTANT: In Drupal 6, the theme system caches template files and which theme 40 functions should be called. What that means is if you add a new theme or 41 preprocess fuction to your template.php file or add a new template (.tpl.php) 42 file to your sub-theme, you will need to rebuild the "theme registry." 43 See http://drupal.org/node/173880#theme-registry 44 45 The base Zen theme is designed to be easily extended by its sub-themes. You 46 shouldn't modify any of the CSS or PHP files in the zen/ folder; but instead 47 you should create a sub-theme of zen which is located in a folder outside of 48 the root zen/ folder. The examples below assume zen and your sub-theme will be 49 installed in sites/all/themes/. 50 51 Why? To learn why you shouldn't modify any of the files in the zen/ folder, 52 see http://drupal.org/node/245802 53 54 NOTE: Steps 1 to 7 have already been completed on this subtheme - you can further 55 refine it using steps 8 onwards 56 57 1. Copy the STARTERKIT folder out of the zen/ folder and rename it to be your 58 new sub-theme. IMPORTANT: Only lowercase letters and underscores should be 59 used for the name of your sub-theme. 60 61 For example, copy the sites/all/themes/zen/STARTERKIT folder and rename it 62 as sites/all/themes/foo. 63 64 Why? Each theme should reside in its own folder. Unlike in Drupal 5, 65 sub-themes can (and should) reside in a folder separate from their base 66 theme. 67 68 2. In your new sub-theme folder, rename the STARTERKIT.info file to the name 69 of your new sub-theme. Then edit the .info file by changing any occurrence 70 of STARTERKIT with the name of your sub-theme and editing the name and 71 description field. 72 73 For example, rename the foo/STARTERKIT.info file to foo/foo.info. Edit the 74 foo.info file and change "STARTERKIT.css" to "foo.css", change "name = Zen 75 Themer's Starter Kit" to "name = Foo", and change "description = Read..." 76 to "description = A Zen sub-theme". 77 78 Why? The .info file describes the basic things about your theme: its 79 name, description, features, template regions, CSS files, and javascript 80 files. See the Drupal 6 Theme Guide for more info: 81 http://drupal.org/node/171205 82 83 3. If you want a liquid layout for your theme, copy the layout-liquid.css from 84 the zen/zen folder and place it in your sub-theme's folder. If you want a 85 fixed-width layout for your theme, copy the layout-fixed.css from the 86 zen/zen folder and place it in your sub-theme's folder. Rename the layout 87 stylesheet to "layout.css". 88 89 For example, copy zen/zen/layout-fixed.css and rename it as foo/layout.css. 90 Note that the .info file already has an entry for your layout.css file. 91 92 Why? In Drupal 6 theming, if you want to modify a stylesheet included 93 by the base theme or by a module, you should copy the stylsheet from the 94 base theme or module's directory to your sub-theme's directory and then 95 add the stylesheet to your .info file. See the Drupal 6 Theme Guide for 96 more info: http://drupal.org/node/171209 97 98 4. Copy the zen stylesheet from the zen folder and place it in your 99 sub-theme's folder. Rename it to be the name of your sub-theme. 100 101 For example, copy zen/zen/zen.css and rename it as foo/foo.css. Note that 102 the .info file already has an entry for your foo.css file and that your 103 .info file removes the base theme's zen.css file. 104 105 5. Copy the print stylesheet from the zen folder and place it in your 106 sub-theme's folder. 107 108 For example, copy zen/zen/print.css to foo/print.css. Note that the .info 109 file already has an entry for your print.css file. 110 111 6. Copy the html-elements stylesheet from the zen folder and place it in your 112 sub-theme's folder. 113 114 For example, copy zen/zen/html-elements.css to foo/html-elements.css. Note 115 that the .info file already has an entry for your html-elements.css file. 116 117 7. Edit the template.php and theme-settings.php files in your sub-theme's 118 folder; replace ALL occurances of "STARTERKIT" with the name of your 119 sub-theme. 120 121 For example, edit foo/template.php and foo/theme-settings.php and replace 122 "STARTERKIT" with "foo". 123 124 8. Log in as an administrator on your Drupal site and go to Administer > Site 125 building > Themes (admin/build/themes) and enable your new sub-theme. 126 127 Optional: 128 129 9. MODIFYING ZEN CORE STYLESHEETS: 130 If you decide you want to modify any of the other stylesheets in the zen 131 folder, copy them to your sub-theme's folder before making any changes. 132 Also, be sure the new stylesheet is included in your .info file and that 133 you have rebuilt the theme registry. 134 135 For example, copy zen/zen/wireframes.css to foo/wireframes.css. Then edit 136 foo/foo.info and uncomment this line to activate it: 137 ;stylesheets[all][] = block-editing.css 138 to: 139 stylesheets[all][] = block-editing.css 140 141 10. MODIFYING ZEN CORE TEMPLATE FILES: 142 If you decide you want to modify any of the .tpl.php template files in the 143 zen folder, copy them to your sub-theme's folder before making any changes. 144 And then rebuild the theme registry. 145 146 For example, copy zen/zen/page.tpl.php to foo/page.tpl.php. 147 148 11. THEMEING DRUPAL'S SEARCH FORM: 149 Copy the search-theme-form.tpl.php template file from the modules/search/ 150 folder and place it in your sub-theme's folder. And then rebuild the theme 151 registry. 152 153 You can find a full list of Drupal templates that you can override on: 154 http://drupal.org/node/190815 155 156 Why? In Drupal 6 theming, if you want to modify a template included 157 by a module, you should copy the template file from the module's 158 directory to your sub-theme's directory and then rebuild the theme 159 registry. See the Drupal 6 Theme Guide for more info: 160 http://drupal.org/node/173880 161 162 12. FURTHER EXTENSIONS OF YOUR SUB-THEME: 163 Discover further ways to extend your sub-theme by reading Zen's 164 documentation online at: 165 http://drupal.org/node/193318 166 and Drupal 6's Theme Guide online at: 167 http://drupal.org/theme-guide
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |