SlideShare a Scribd company logo
BUILD A THEME WITH ZEN
----------------------

The base Zen theme is designed to be easily extended by its sub-themes. You
shouldn't modify any of the CSS or PHP files in the zen/ folder; but instead you
should create a sub-theme of zen which is located in a folder outside of the
root zen/ folder. The examples below assume zen and your sub-theme will be
installed in sites/all/themes/, but any valid theme directory is acceptable
(read the sites/default/default.settings.php for more info.)

  Why? To learn why you shouldn't modify any of the files in the zen/ folder,
  see http://drupal.org/node/245802


*** IMPORTANT NOTE ***
*
* In Drupal 7, the theme system caches which template files and which theme
* functions should be called. This means that if you add a new theme,
* preprocess or process function to your template.php file or add a new template
* (.tpl.php) file to your sub-theme, you will need to rebuild the "theme
* registry." See http://drupal.org/node/173880#theme-registry
*
* Drupal 7 also stores a cache of the data in .info files. If you modify any
* lines in your sub-theme's .info file, you MUST refresh Drupal 7's cache by
* simply visiting the Appearance page at admin/appearance.
*


 1. Setup the location for your new sub-theme.

    Copy the STARTERKIT folder out of the zen/ folder and rename it to be your
    new sub-theme. IMPORTANT: The name of your sub-theme must start with an
    alphabetic character and can only contain lowercase letters, numbers and
    underscores.

    For example, copy the sites/all/themes/zen/STARTERKIT folder and rename it
    as sites/all/themes/foo.

      Why? Each theme should reside in its own folder. To make it easier to
      upgrade Zen, sub-themes should reside in a folder separate from the base
      theme.

 2. Setup the basic information for your sub-theme.

    In your new sub-theme folder, rename the STARTERKIT.info.txt file to include
    the name of your new sub-theme and remove the ".txt" extension. Then edit
    the .info file by editing the name and description field.

    For example, rename the foo/STARTERKIT.info file to foo/foo.info. Edit the
    foo.info file and change "name = Zen Sub-theme Starter Kit" to "name = Foo"
    and "description = Read..." to "description = A Zen sub-theme".

      Why? The .info file describes the basic things about your theme: its
      name, description, features, template regions, CSS files, and JavaScript
      files. See the Drupal 7 Theme Guide for more info:
      http://drupal.org/node/171205

    Then, visit your site's Appearance page at admin/appearance to refresh
    Drupal 7's cache of .info file data.
3. Choose your preferred page layout method or grid system.

   By default your new sub-theme is using a fixed-width layout. If you want a
   liquid layout for your theme, delete the unneeded layout-fixed.css and
   layout-fixed-rtl.css files and edit your sub-theme's .info file and replace
   the reference to layout-fixed.css with layout-liquid.css.

   For example, edit foo/foo.info and change this line:
     stylesheets[all][]   = css/layout-fixed.css
   to:
     stylesheets[all][]   = css/layout-liquid.css

     Why? The "stylesheets" lines in your .info file describe the media type
     and path to the CSS file you want to include. The format for these lines
     is: stylesheets[MEDIA][] = path/to/file.css

   Alternatively, if you are more familiar with a different CSS layout method,
   such as Blueprint or 960.gs, you can replace the "css/layout-fixed.css" line
   in your .info file with a line pointing at your choice of layout CSS file.

   Then, visit your site's Appearance page at admin/appearance to refresh
   Drupal 7's cache of .info file data.

4. Edit your sub-theme to use the proper function names.

   Edit the template.php and theme-settings.php files in your sub-theme's
   folder; replace ALL occurrences of "STARTERKIT" with the name of your
   sub-theme.

   For example, edit foo/template.php and foo/theme-settings.php and replace
   every occurrence of "STARTERKIT" with "foo".

   It is recommended to use a text editing application with search and
   "replace all" functionality.

5. Set your website's default theme.

   Log in as an administrator on your Drupal site, go to the Appearance page at
   admin/appearance and click the "Enable and set default" link next to your
   new sub-theme.


Optional steps:

6. Modify the markup in Zen core's template files.

   If you decide you want to modify any of the .tpl.php template files in the
   zen folder, copy them to your sub-theme's folder before making any changes.
   And then rebuild the theme registry.

   For example, copy zen/templates/page.tpl.php to foo/templates/page.tpl.php.

7. Modify the markup in Drupal's search form.

   Copy the search-block-form.tpl.php template file from the modules/search/
   folder and place it in your sub-theme's template folder. And then rebuild
   the theme registry.
You can find a full list of Drupal templates that you can override in the
  templates/README.txt file or http://drupal.org/node/190815

    Why? In Drupal 7 theming, if you want to modify a template included by a
    module, you should copy the template file from the module's directory to
    your sub-theme's template directory and then rebuild the theme registry.
    See the Drupal 7 Theme Guide for more info: http://drupal.org/node/173880

8. Further extend your sub-theme.

  Discover further ways to extend your sub-theme by reading Zen's
  documentation online at:
    http://drupal.org/node/193318
  and Drupal 7's Theme Guide online at:
    http://drupal.org/theme-guide

More Related Content

Viewers also liked

Happy Valentine 2012
Happy Valentine 2012Happy Valentine 2012
Happy Valentine 2012
Nguyen Tuan Anh
 
How to Manage Cloud Based Computing Products #pcdub
How to Manage Cloud Based Computing Products #pcdubHow to Manage Cloud Based Computing Products #pcdub
How to Manage Cloud Based Computing Products #pcdub
Product Camp Dublin
 
Gunnar vingren e daniel berg
Gunnar vingren e daniel bergGunnar vingren e daniel berg
Gunnar vingren e daniel berg
LUÍS CLÁUDIO REOLIVE
 
East Gobi Slide Show 2011
East Gobi Slide Show 2011East Gobi Slide Show 2011
East Gobi Slide Show 2011
joyinmongolia
 
Divórcio e novo casamento revista ultimato
Divórcio e novo casamento revista ultimatoDivórcio e novo casamento revista ultimato
Divórcio e novo casamento revista ultimato
LUÍS CLÁUDIO REOLIVE
 
Sotrycode Grand Ouest 1er juillet - La Réalité Virtuelle, un média global
Sotrycode Grand Ouest 1er juillet - La Réalité Virtuelle, un média globalSotrycode Grand Ouest 1er juillet - La Réalité Virtuelle, un média global
Sotrycode Grand Ouest 1er juillet - La Réalité Virtuelle, un média global
Marc Bourhis
 
Do more with LESS!
Do more with LESS!Do more with LESS!
Do more with LESS!Neven Falica
 
Giới thiệu về mô hình đối thoại World Cafe
Giới thiệu về mô hình đối thoại World Cafe Giới thiệu về mô hình đối thoại World Cafe
Giới thiệu về mô hình đối thoại World Cafe
Nguyen Tuan Anh
 

Viewers also liked (9)

Happy Valentine 2012
Happy Valentine 2012Happy Valentine 2012
Happy Valentine 2012
 
How to Manage Cloud Based Computing Products #pcdub
How to Manage Cloud Based Computing Products #pcdubHow to Manage Cloud Based Computing Products #pcdub
How to Manage Cloud Based Computing Products #pcdub
 
Gunnar vingren e daniel berg
Gunnar vingren e daniel bergGunnar vingren e daniel berg
Gunnar vingren e daniel berg
 
6.chinh sachtghd
6.chinh sachtghd6.chinh sachtghd
6.chinh sachtghd
 
East Gobi Slide Show 2011
East Gobi Slide Show 2011East Gobi Slide Show 2011
East Gobi Slide Show 2011
 
Divórcio e novo casamento revista ultimato
Divórcio e novo casamento revista ultimatoDivórcio e novo casamento revista ultimato
Divórcio e novo casamento revista ultimato
 
Sotrycode Grand Ouest 1er juillet - La Réalité Virtuelle, un média global
Sotrycode Grand Ouest 1er juillet - La Réalité Virtuelle, un média globalSotrycode Grand Ouest 1er juillet - La Réalité Virtuelle, un média global
Sotrycode Grand Ouest 1er juillet - La Réalité Virtuelle, un média global
 
Do more with LESS!
Do more with LESS!Do more with LESS!
Do more with LESS!
 
Giới thiệu về mô hình đối thoại World Cafe
Giới thiệu về mô hình đối thoại World Cafe Giới thiệu về mô hình đối thoại World Cafe
Giới thiệu về mô hình đối thoại World Cafe
 

Similar to Readme

Drupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotechDrupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotech
Mandakini Kumari
 
Drupal theme development
Drupal theme developmentDrupal theme development
Drupal theme development
Fortune Innovations Dublin
 
Drupal Theme Development
Drupal Theme DevelopmentDrupal Theme Development
Drupal Theme Development
Web Development Montreal
 
Z04 etano template_basics
Z04 etano template_basicsZ04 etano template_basics
Z04 etano template_basics
Daouni Monsite
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in Drupal
Wingston
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magento
hainutemicute
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
heatherrumd
 
Converting (X)HTML/CSS template to Drupal 7 Theme
Converting (X)HTML/CSS template to Drupal 7 ThemeConverting (X)HTML/CSS template to Drupal 7 Theme
Converting (X)HTML/CSS template to Drupal 7 Theme
Adolfo Nasol
 
Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricks
aaroncouch
 
WortdPress Child themes: Why and How
WortdPress Child themes: Why and HowWortdPress Child themes: Why and How
WortdPress Child themes: Why and How
Paul Bearne
 
Drupal 7 install with modules and themes
Drupal 7 install with modules and themesDrupal 7 install with modules and themes
Drupal 7 install with modules and themes
Geshan Manandhar
 
Drupal
DrupalDrupal
Drupal
tnhomestead
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
Arshad Vayani
 
Child Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notesChild Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notes
Damien Carbery
 
puissance-2roue
puissance-2rouepuissance-2roue
puissance-2roue
Daouni Monsite
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
heatherrumd
 
SynapseIndia drupal presentation on drupal best practices
SynapseIndia drupal  presentation on drupal best practicesSynapseIndia drupal  presentation on drupal best practices
SynapseIndia drupal presentation on drupal best practices
Synapseindiappsdevelopment
 
Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality
Rakesh Kushwaha
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
Laura Hartwig
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
Philip Norton
 

Similar to Readme (20)

Drupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotechDrupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotech
 
Drupal theme development
Drupal theme developmentDrupal theme development
Drupal theme development
 
Drupal Theme Development
Drupal Theme DevelopmentDrupal Theme Development
Drupal Theme Development
 
Z04 etano template_basics
Z04 etano template_basicsZ04 etano template_basics
Z04 etano template_basics
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in Drupal
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magento
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
 
Converting (X)HTML/CSS template to Drupal 7 Theme
Converting (X)HTML/CSS template to Drupal 7 ThemeConverting (X)HTML/CSS template to Drupal 7 Theme
Converting (X)HTML/CSS template to Drupal 7 Theme
 
Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricks
 
WortdPress Child themes: Why and How
WortdPress Child themes: Why and HowWortdPress Child themes: Why and How
WortdPress Child themes: Why and How
 
Drupal 7 install with modules and themes
Drupal 7 install with modules and themesDrupal 7 install with modules and themes
Drupal 7 install with modules and themes
 
Drupal
DrupalDrupal
Drupal
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 
Child Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notesChild Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notes
 
puissance-2roue
puissance-2rouepuissance-2roue
puissance-2roue
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
 
SynapseIndia drupal presentation on drupal best practices
SynapseIndia drupal  presentation on drupal best practicesSynapseIndia drupal  presentation on drupal best practices
SynapseIndia drupal presentation on drupal best practices
 
Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 

Recently uploaded

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 

Recently uploaded (20)

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 

Readme

  • 1. BUILD A THEME WITH ZEN ---------------------- The base Zen theme is designed to be easily extended by its sub-themes. You shouldn't modify any of the CSS or PHP files in the zen/ folder; but instead you should create a sub-theme of zen which is located in a folder outside of the root zen/ folder. The examples below assume zen and your sub-theme will be installed in sites/all/themes/, but any valid theme directory is acceptable (read the sites/default/default.settings.php for more info.) Why? To learn why you shouldn't modify any of the files in the zen/ folder, see http://drupal.org/node/245802 *** IMPORTANT NOTE *** * * In Drupal 7, the theme system caches which template files and which theme * functions should be called. This means that if you add a new theme, * preprocess or process function to your template.php file or add a new template * (.tpl.php) file to your sub-theme, you will need to rebuild the "theme * registry." See http://drupal.org/node/173880#theme-registry * * Drupal 7 also stores a cache of the data in .info files. If you modify any * lines in your sub-theme's .info file, you MUST refresh Drupal 7's cache by * simply visiting the Appearance page at admin/appearance. * 1. Setup the location for your new sub-theme. Copy the STARTERKIT folder out of the zen/ folder and rename it to be your new sub-theme. IMPORTANT: The name of your sub-theme must start with an alphabetic character and can only contain lowercase letters, numbers and underscores. For example, copy the sites/all/themes/zen/STARTERKIT folder and rename it as sites/all/themes/foo. Why? Each theme should reside in its own folder. To make it easier to upgrade Zen, sub-themes should reside in a folder separate from the base theme. 2. Setup the basic information for your sub-theme. In your new sub-theme folder, rename the STARTERKIT.info.txt file to include the name of your new sub-theme and remove the ".txt" extension. Then edit the .info file by editing the name and description field. For example, rename the foo/STARTERKIT.info file to foo/foo.info. Edit the foo.info file and change "name = Zen Sub-theme Starter Kit" to "name = Foo" and "description = Read..." to "description = A Zen sub-theme". Why? The .info file describes the basic things about your theme: its name, description, features, template regions, CSS files, and JavaScript files. See the Drupal 7 Theme Guide for more info: http://drupal.org/node/171205 Then, visit your site's Appearance page at admin/appearance to refresh Drupal 7's cache of .info file data.
  • 2. 3. Choose your preferred page layout method or grid system. By default your new sub-theme is using a fixed-width layout. If you want a liquid layout for your theme, delete the unneeded layout-fixed.css and layout-fixed-rtl.css files and edit your sub-theme's .info file and replace the reference to layout-fixed.css with layout-liquid.css. For example, edit foo/foo.info and change this line: stylesheets[all][] = css/layout-fixed.css to: stylesheets[all][] = css/layout-liquid.css Why? The "stylesheets" lines in your .info file describe the media type and path to the CSS file you want to include. The format for these lines is: stylesheets[MEDIA][] = path/to/file.css Alternatively, if you are more familiar with a different CSS layout method, such as Blueprint or 960.gs, you can replace the "css/layout-fixed.css" line in your .info file with a line pointing at your choice of layout CSS file. Then, visit your site's Appearance page at admin/appearance to refresh Drupal 7's cache of .info file data. 4. Edit your sub-theme to use the proper function names. Edit the template.php and theme-settings.php files in your sub-theme's folder; replace ALL occurrences of "STARTERKIT" with the name of your sub-theme. For example, edit foo/template.php and foo/theme-settings.php and replace every occurrence of "STARTERKIT" with "foo". It is recommended to use a text editing application with search and "replace all" functionality. 5. Set your website's default theme. Log in as an administrator on your Drupal site, go to the Appearance page at admin/appearance and click the "Enable and set default" link next to your new sub-theme. Optional steps: 6. Modify the markup in Zen core's template files. If you decide you want to modify any of the .tpl.php template files in the zen folder, copy them to your sub-theme's folder before making any changes. And then rebuild the theme registry. For example, copy zen/templates/page.tpl.php to foo/templates/page.tpl.php. 7. Modify the markup in Drupal's search form. Copy the search-block-form.tpl.php template file from the modules/search/ folder and place it in your sub-theme's template folder. And then rebuild the theme registry.
  • 3. You can find a full list of Drupal templates that you can override in the templates/README.txt file or http://drupal.org/node/190815 Why? In Drupal 7 theming, if you want to modify a template included by a module, you should copy the template file from the module's directory to your sub-theme's template directory and then rebuild the theme registry. See the Drupal 7 Theme Guide for more info: http://drupal.org/node/173880 8. Further extend your sub-theme. Discover further ways to extend your sub-theme by reading Zen's documentation online at: http://drupal.org/node/193318 and Drupal 7's Theme Guide online at: http://drupal.org/theme-guide