[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/themes/zen/ -> README.txt (source)

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


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7