SlideShare a Scribd company logo
Theming Drupal
  Beyond the Look and Feel
Chris Albrecht
Drupal Developer

National Renewable Energy Lab
  Since Drupal 6.20 (2 years, 3 months)

Living Drupal
  Since Drupal 5.2 (5 years, 7 months)

Contributed modules, developed
themes, managed projects, configured
servers, …
Getting Started
   New to Drupal

   Three basic templates

   Flat HTML files

   Strict enterprise standards

   508 compliance

   Need reusable themes

   Built-in standards and structure
What Makes a Theme?
   Markup + CSS
                                               Module
                                               Retrieves data
   Markup lives in template files and theme   from database.
    functions

   Data is pushed in, final markup returned   (Pre)processor
                                               Applies logic and
   In between are preprocessors and           manipulates data.
    processors

   MVC architecture                           Template
       Model = Modules                        Renders markup
                                               implementing data
       Controller = (Pre)processors
                                               where needed.
       View = Themes/Templates
Building Out a Theme
   One theme to rule them all?

   Build a flexible base theme

   Start simple

   Locate desired template file

   Devel Themer
          http://drupal.org/project/devel_themer

   Copy template to your theme and alter it

   Use (pre)processors to manipulate the data
Template Patterns
   Look for double underscores
    or double hyphens

   Allows for fallback

   Extends flexibility

   Provides specific themable
    instances

   Views uses these extensively
*
 Implementation of template_preprocess().
*
 Implementation of template_preprocess().
nction THEME_preprocess_page(&$vars) {
      (Pre)processing Data
/ Generate CSS classes relating to content
f (!empty($vars[‘page’][‘topnav’])) { $hook) {
nction THEME_preprocess(&$vars,
 $vars[‘body_classes’][] = ‘topnav’;
        Preprocessors vs Processors                                Extend the processors
nction THEME_process(&$vars, $hook) {
        Order of implementation                                    Add template suggestions

         What gets processed?                                      Adjust styles

                                            template.php
      /**
       * Implementation of template_preprocess().
       */
      function THEME_preprocess_page(&$vars) {
           Alter the page data for node 100
        // Add a printable template
           (in_array(‘page__node__100’, $vars[‘theme_hook_suggestions’])) {
        if (isset($_GET[‘print’])) {
          $vars[‘theme_hook_suggestions’][] = ‘page__printable’;
          ...
        }
      }
Adding Theme Settings
   theme_settings.php
           hook_form_system_theme_settings_alter()

   Defaults in .info file

   Use theme settings in processors

$form[‘color_scheme’] = array(
name = My Theme
/**
core = 7.x ‘radios’, template_preprocess().
 *‘#type’ =>
   Implementation of
  ‘#title’ => t(‘Color Scheme’),
 */
; Stylesheets array(
  ‘#options’ =>
function THEME_preprocess_html(&$vars) {
  //‘green’ => t(‘Green’), this color scheme.
     Add the stylesheet for
; Settings t(‘Blue’),
    ‘blue’ =>
  $color_scheme = theme_get_setting(‘color_scheme’);
  drupal_add_css(path_to_theme() . ‘/css/’ . $color_scheme . ‘.css’);
settings[color_scheme] = green
  ),
} ‘#default_value’ => theme_get_setting(‘color_scheme’),
settings[site_format] = program
);
Create Base Structure
   Use Features module
             http://drupal.org/projects/features

   Standard content types

   Default views

   Set regional templates
       Ex. Block titles in left sidebar are H3, in right are H4.
       block--left.tpl.php, block--right.tpl.php
Case Study – EERE Theme
   Theme settings                            EERE News Feature
       Color scheme                              News content type
       Site format                               Default page and block views
       Include sitemap
                                              EERE Events Feature
       Base breadcrumbs
                                                  Events content type
   Menus                                         Default page, block and calendar
       Top navigation = Main Menu                 views
       Left navigation = Secondary Menu
                                              Includes
       Page-top links = Global Menu
                                                  Panels layouts
       Page-bottom = Footer Menu
                                                  Printable template
                                                  Standard 403 and 404 pages
Putting it All Together
   Download and enable the base theme

   Download and enable the base module

   Create sub-theme to extend/override base theme if necessary
       Add custom stylesheets for site specific areas
       Add (pre)processors
       Create custom templates to override existing ones

   Sub-theme inherits all the base theme’s settings

   Sub-theme functions always called after base themes
Summary
   Leverage preprocessors

   Use well crafted template overrides

   Keep logic out of templates

   Give users control via theme settings

   Use features to encapsulate stock functionality

   Spin up a new site in less than a day
Questions?
Chris Albrecht


  NREL: chris.albrecht@nrel.gov


  Other: chris@162unlimited.com


  Twitter: @ChrisAlbrecht


  D.o: http://drupal.org/user/176328
         (KeyboardCowboy)

More Related Content

What's hot

Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep dive
Romain Jarraud
 
Customizing the look and-feel of DSpace
Customizing the look and-feel of DSpaceCustomizing the look and-feel of DSpace
Customizing the look and-feel of DSpace
Bharat Chaudhari
 
Drupal 7 database api
Drupal 7 database api Drupal 7 database api
Drupal 7 database api
Andrii Podanenko
 
Creating Custom Drupal Modules
Creating Custom Drupal ModulesCreating Custom Drupal Modules
Creating Custom Drupal Modules
tanoshimi
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
ipsitamishra
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
Vibrant Technologies & Computers
 
Intro to drupal module internals asheville
Intro to drupal module internals ashevilleIntro to drupal module internals asheville
Intro to drupal module internals asheville
cgmonroe
 
Basic Introduction to Drupal
Basic Introduction to DrupalBasic Introduction to Drupal
Basic Introduction to Drupal
Murtaza Alvi
 
Performance on a budget (European Drupal Days 2015)
Performance on a budget (European Drupal Days 2015)  Performance on a budget (European Drupal Days 2015)
Performance on a budget (European Drupal Days 2015)
Eugenio Minardi
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011camp_drupal_ua
 
Drupal module development training delhi
Drupal module development training delhiDrupal module development training delhi
Drupal module development training delhiunitedwebsoft
 
Drupal 7 — Circle theme
Drupal 7 — Circle themeDrupal 7 — Circle theme
Drupal 7 — Circle theme
Kirill Borzov
 
DSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI ThemingDSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI ThemingDuraSpace
 
Themes and layouts
Themes and layoutsThemes and layouts
Themes and layouts
AbhishekSRC
 
Config management
Config managementConfig management
Config management
Alexei Goja
 
Keycloak theme customization
Keycloak theme customizationKeycloak theme customization
Keycloak theme customization
Ravi Yasas
 
Migrate - new way site upgrade
Migrate - new way site upgradeMigrate - new way site upgrade
Migrate - new way site upgrade
DrupalCampDN
 

What's hot (17)

Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep dive
 
Customizing the look and-feel of DSpace
Customizing the look and-feel of DSpaceCustomizing the look and-feel of DSpace
Customizing the look and-feel of DSpace
 
Drupal 7 database api
Drupal 7 database api Drupal 7 database api
Drupal 7 database api
 
Creating Custom Drupal Modules
Creating Custom Drupal ModulesCreating Custom Drupal Modules
Creating Custom Drupal Modules
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 
Intro to drupal module internals asheville
Intro to drupal module internals ashevilleIntro to drupal module internals asheville
Intro to drupal module internals asheville
 
Basic Introduction to Drupal
Basic Introduction to DrupalBasic Introduction to Drupal
Basic Introduction to Drupal
 
Performance on a budget (European Drupal Days 2015)
Performance on a budget (European Drupal Days 2015)  Performance on a budget (European Drupal Days 2015)
Performance on a budget (European Drupal Days 2015)
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
 
Drupal module development training delhi
Drupal module development training delhiDrupal module development training delhi
Drupal module development training delhi
 
Drupal 7 — Circle theme
Drupal 7 — Circle themeDrupal 7 — Circle theme
Drupal 7 — Circle theme
 
DSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI ThemingDSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI Theming
 
Themes and layouts
Themes and layoutsThemes and layouts
Themes and layouts
 
Config management
Config managementConfig management
Config management
 
Keycloak theme customization
Keycloak theme customizationKeycloak theme customization
Keycloak theme customization
 
Migrate - new way site upgrade
Migrate - new way site upgradeMigrate - new way site upgrade
Migrate - new way site upgrade
 

Similar to Theming Drupal: Beyond the Look and Feel

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 Themes
Drupal ThemesDrupal Themes
Drupal Themes
akosh
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeMediacurrent
 
Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricksaaroncouch
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
sparkfabrik
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in DrupalWingston
 
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 themesGeshan Manandhar
 
Drupal theme development
Drupal theme developmentDrupal theme development
Drupal theme development
Fortune Innovations Dublin
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 
Drupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritenceDrupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritence
Aimee Maree Forsstrom
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First Steps
Luís Carneiro
 
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
 
Theme API
Theme APITheme API
Theme API
rolfvandekrol
 
Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)
Eugenio Minardi
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
Arshad Vayani
 
Drupal
DrupalDrupal
Drupal
tnhomestead
 
Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8
Anne Tomasevich
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
heatherrumd
 

Similar to Theming Drupal: Beyond the Look and Feel (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 Themes
Drupal ThemesDrupal Themes
Drupal Themes
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
 
Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricks
 
Design to Theme @ CMSExpo
Design to Theme @ CMSExpoDesign to Theme @ CMSExpo
Design to Theme @ CMSExpo
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in Drupal
 
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 theme development
Drupal theme developmentDrupal theme development
Drupal theme development
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Drupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritenceDrupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritence
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First Steps
 
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
 
Theme API
Theme APITheme API
Theme API
 
Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 
Drupal
DrupalDrupal
Drupal
 
Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
 

Recently uploaded

Johnny Depp Long Hair: A Signature Look Through the Years
Johnny Depp Long Hair: A Signature Look Through the YearsJohnny Depp Long Hair: A Signature Look Through the Years
Johnny Depp Long Hair: A Signature Look Through the Years
greendigital
 
Gujarat Details in Hindi for children's for presentation in school
Gujarat Details in Hindi for children's for presentation in schoolGujarat Details in Hindi for children's for presentation in school
Gujarat Details in Hindi for children's for presentation in school
shouryajoshi5
 
EXPERIENCE MONSTER BITES STREETWEAR APPAREL
EXPERIENCE MONSTER BITES STREETWEAR APPARELEXPERIENCE MONSTER BITES STREETWEAR APPAREL
EXPERIENCE MONSTER BITES STREETWEAR APPAREL
6ctbkfpdxz
 
30 Manipulation Techniques to be a smart person in society (1).pdf
30 Manipulation Techniques to be a smart person in society (1).pdf30 Manipulation Techniques to be a smart person in society (1).pdf
30 Manipulation Techniques to be a smart person in society (1).pdf
minaserver6679
 
From Stress to Success How Oakland's Corporate Wellness Programs are Cultivat...
From Stress to Success How Oakland's Corporate Wellness Programs are Cultivat...From Stress to Success How Oakland's Corporate Wellness Programs are Cultivat...
From Stress to Success How Oakland's Corporate Wellness Programs are Cultivat...
Kitchen on Fire
 
What Makes Candle Making The Ultimate Bachelorette Celebration
What Makes Candle Making The Ultimate Bachelorette CelebrationWhat Makes Candle Making The Ultimate Bachelorette Celebration
What Makes Candle Making The Ultimate Bachelorette Celebration
Wick & Pour
 
erevna-influencers-social-media-stin-ellada
erevna-influencers-social-media-stin-elladaerevna-influencers-social-media-stin-ellada
erevna-influencers-social-media-stin-ellada
rvlassopoulou
 
La transidentité, un sujet qui fractionne les Français
La transidentité, un sujet qui fractionne les FrançaisLa transidentité, un sujet qui fractionne les Français
La transidentité, un sujet qui fractionne les Français
Ipsos France
 
Unique Wedding Bands For Women Who Want To Stand Out.pptx
Unique Wedding Bands For Women Who Want To Stand Out.pptxUnique Wedding Bands For Women Who Want To Stand Out.pptx
Unique Wedding Bands For Women Who Want To Stand Out.pptx
Andrews Jewelers
 
What To Do If Your Ring Is Too Big? Must Read
What To Do If Your Ring Is Too Big? Must ReadWhat To Do If Your Ring Is Too Big? Must Read
What To Do If Your Ring Is Too Big? Must Read
Andrews Jewelers
 

Recently uploaded (10)

Johnny Depp Long Hair: A Signature Look Through the Years
Johnny Depp Long Hair: A Signature Look Through the YearsJohnny Depp Long Hair: A Signature Look Through the Years
Johnny Depp Long Hair: A Signature Look Through the Years
 
Gujarat Details in Hindi for children's for presentation in school
Gujarat Details in Hindi for children's for presentation in schoolGujarat Details in Hindi for children's for presentation in school
Gujarat Details in Hindi for children's for presentation in school
 
EXPERIENCE MONSTER BITES STREETWEAR APPAREL
EXPERIENCE MONSTER BITES STREETWEAR APPARELEXPERIENCE MONSTER BITES STREETWEAR APPAREL
EXPERIENCE MONSTER BITES STREETWEAR APPAREL
 
30 Manipulation Techniques to be a smart person in society (1).pdf
30 Manipulation Techniques to be a smart person in society (1).pdf30 Manipulation Techniques to be a smart person in society (1).pdf
30 Manipulation Techniques to be a smart person in society (1).pdf
 
From Stress to Success How Oakland's Corporate Wellness Programs are Cultivat...
From Stress to Success How Oakland's Corporate Wellness Programs are Cultivat...From Stress to Success How Oakland's Corporate Wellness Programs are Cultivat...
From Stress to Success How Oakland's Corporate Wellness Programs are Cultivat...
 
What Makes Candle Making The Ultimate Bachelorette Celebration
What Makes Candle Making The Ultimate Bachelorette CelebrationWhat Makes Candle Making The Ultimate Bachelorette Celebration
What Makes Candle Making The Ultimate Bachelorette Celebration
 
erevna-influencers-social-media-stin-ellada
erevna-influencers-social-media-stin-elladaerevna-influencers-social-media-stin-ellada
erevna-influencers-social-media-stin-ellada
 
La transidentité, un sujet qui fractionne les Français
La transidentité, un sujet qui fractionne les FrançaisLa transidentité, un sujet qui fractionne les Français
La transidentité, un sujet qui fractionne les Français
 
Unique Wedding Bands For Women Who Want To Stand Out.pptx
Unique Wedding Bands For Women Who Want To Stand Out.pptxUnique Wedding Bands For Women Who Want To Stand Out.pptx
Unique Wedding Bands For Women Who Want To Stand Out.pptx
 
What To Do If Your Ring Is Too Big? Must Read
What To Do If Your Ring Is Too Big? Must ReadWhat To Do If Your Ring Is Too Big? Must Read
What To Do If Your Ring Is Too Big? Must Read
 

Theming Drupal: Beyond the Look and Feel

  • 1. Theming Drupal Beyond the Look and Feel
  • 2. Chris Albrecht Drupal Developer National Renewable Energy Lab Since Drupal 6.20 (2 years, 3 months) Living Drupal Since Drupal 5.2 (5 years, 7 months) Contributed modules, developed themes, managed projects, configured servers, …
  • 3. Getting Started  New to Drupal  Three basic templates  Flat HTML files  Strict enterprise standards  508 compliance  Need reusable themes  Built-in standards and structure
  • 4. What Makes a Theme?  Markup + CSS Module Retrieves data  Markup lives in template files and theme from database. functions  Data is pushed in, final markup returned (Pre)processor Applies logic and  In between are preprocessors and manipulates data. processors  MVC architecture Template  Model = Modules Renders markup implementing data  Controller = (Pre)processors where needed.  View = Themes/Templates
  • 5. Building Out a Theme  One theme to rule them all?  Build a flexible base theme  Start simple  Locate desired template file  Devel Themer http://drupal.org/project/devel_themer  Copy template to your theme and alter it  Use (pre)processors to manipulate the data
  • 6. Template Patterns  Look for double underscores or double hyphens  Allows for fallback  Extends flexibility  Provides specific themable instances  Views uses these extensively
  • 7. * Implementation of template_preprocess(). * Implementation of template_preprocess(). nction THEME_preprocess_page(&$vars) { (Pre)processing Data / Generate CSS classes relating to content f (!empty($vars[‘page’][‘topnav’])) { $hook) { nction THEME_preprocess(&$vars, $vars[‘body_classes’][] = ‘topnav’;  Preprocessors vs Processors  Extend the processors nction THEME_process(&$vars, $hook) {  Order of implementation  Add template suggestions  What gets processed?  Adjust styles template.php /** * Implementation of template_preprocess(). */ function THEME_preprocess_page(&$vars) { Alter the page data for node 100 // Add a printable template (in_array(‘page__node__100’, $vars[‘theme_hook_suggestions’])) { if (isset($_GET[‘print’])) { $vars[‘theme_hook_suggestions’][] = ‘page__printable’; ... } }
  • 8. Adding Theme Settings  theme_settings.php hook_form_system_theme_settings_alter()  Defaults in .info file  Use theme settings in processors $form[‘color_scheme’] = array( name = My Theme /** core = 7.x ‘radios’, template_preprocess(). *‘#type’ => Implementation of ‘#title’ => t(‘Color Scheme’), */ ; Stylesheets array( ‘#options’ => function THEME_preprocess_html(&$vars) { //‘green’ => t(‘Green’), this color scheme. Add the stylesheet for ; Settings t(‘Blue’), ‘blue’ => $color_scheme = theme_get_setting(‘color_scheme’); drupal_add_css(path_to_theme() . ‘/css/’ . $color_scheme . ‘.css’); settings[color_scheme] = green ), } ‘#default_value’ => theme_get_setting(‘color_scheme’), settings[site_format] = program );
  • 9. Create Base Structure  Use Features module http://drupal.org/projects/features  Standard content types  Default views  Set regional templates  Ex. Block titles in left sidebar are H3, in right are H4.  block--left.tpl.php, block--right.tpl.php
  • 10. Case Study – EERE Theme  Theme settings  EERE News Feature  Color scheme  News content type  Site format  Default page and block views  Include sitemap  EERE Events Feature  Base breadcrumbs  Events content type  Menus  Default page, block and calendar  Top navigation = Main Menu views  Left navigation = Secondary Menu  Includes  Page-top links = Global Menu  Panels layouts  Page-bottom = Footer Menu  Printable template  Standard 403 and 404 pages
  • 11. Putting it All Together  Download and enable the base theme  Download and enable the base module  Create sub-theme to extend/override base theme if necessary  Add custom stylesheets for site specific areas  Add (pre)processors  Create custom templates to override existing ones  Sub-theme inherits all the base theme’s settings  Sub-theme functions always called after base themes
  • 12. Summary  Leverage preprocessors  Use well crafted template overrides  Keep logic out of templates  Give users control via theme settings  Use features to encapsulate stock functionality  Spin up a new site in less than a day
  • 13. Questions? Chris Albrecht NREL: chris.albrecht@nrel.gov Other: chris@162unlimited.com Twitter: @ChrisAlbrecht D.o: http://drupal.org/user/176328 (KeyboardCowboy)