SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Drupal 7 Themes ( part 1 )
Chris Charlton - LA Drupal - XTND.US http://xtnd.us
Added jQuery 1.4 to core
Added jQuery UI (1.8) to core
Stark is the new Zen

Based on Zen theme framework for Drupal.
Stark theme (new)
  Plain white “vanilla” base theme.
  CSS only sub-themes.
The box.tpl.php template
has been removed


         ( it’s about time )
Blocks have new, more
meaningful CSS IDs
Search form
Old CSS ID (Drupal 6): #block-search-0
New CSS ID (Drupal 7): #block-search-form


User login
Old CSS ID (Drupal 6): block-user-0
New CSS ID (Drupal 7): block-user-login
The clear-block CSS class
has been renamed to clearfix

          Drupal 6
          .clear-block


          Drupal 7
          .clearfix
Search box moved from
theme layer to blocks
Primary and secondary links are
now Main and Secondary menu
         Drupal 6
         $primary_links
         $secondary_links


         Drupal 7
         $main_menu
         $secondary_menu
Unrendered taxonomy links
variable gone in node.tpl.php

          Drupal 6
          $taxonomy


          Drupal 7
          $terms
Remove $footer_message
variable from page.tpl.php



    remove $footer_message
$help became a region.
$help still used in page.tpl.php


     Drupal 7 Theme .info file:

     regions[help] = Help
Mission statement removed,
'highlight' region suggested


  Drupal 7 Theme .info file:

  regions[highlight] = Highlight
$content became a
mandatory region

  Drupal 7 Theme .info file:

  regions[content] = Content
$closure region becomes:


        $page_bottom
        $page_top
$left and $right variables are
now $sidebar_first and
$sidebar_second;
CSS IDs also changed
Renamed $block->content
to $content in block.tpl.php
There are now two sets of
variables process functions

         preprocess


         process
Templates have a variable for
 CSS classes: $classes_array
 <?php
 function mytheme_preprocess_node(&$vars) {
   // Add an additional class.
   $vars['classes_array'][] = 'new-class-to-add';
 }
 ?>


node.tpl.php:
 <div class="<?php print $classes ?>">
   ...
 </div>
All templates can print out
dynamic attributes

       $attributes
       $title_attributes
       $content_attributes
Variable process functions
can now be used for all
theming hooks
All theme functions now
take a single argument


        $variables
Function names must match
theme name


You may no longer use phptemplate_function
CSS and JavaScript files
must be specified in .info file


 No more automatic style.css
 No more automatic script.js
Granular rendering in node and
user templates


  <?php
    // Hide the comments and links to render them later.
    hide($content['comments']);
    hide($content['links']);
    print render($content);
  ?>
Drupal 7 outputs RDFa requiring a
change at top of page.tpl.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="<?php print $language->language ?>"
dir="<?php print $language->dir ?>"
  <?php print $rdf_namespaces ?>>
  <head profile="<?php print $grddl_profile ?>">
More online


http://drupal.org/update/theme/6/7
http://tinyurl.com/theme-drupal
http://xtnd.us

Weitere ähnliche Inhalte

Was ist angesagt?

Zf Zend Db by aida
Zf Zend Db by aidaZf Zend Db by aida
Zf Zend Db by aida
waraiotoko
 
Drupal Step-by-Step: How We Built Our Training Site, Part 1
Drupal Step-by-Step: How We Built Our Training Site, Part 1Drupal Step-by-Step: How We Built Our Training Site, Part 1
Drupal Step-by-Step: How We Built Our Training Site, Part 1
Acquia
 
Sqlxml vs xquery
Sqlxml vs xquerySqlxml vs xquery
Sqlxml vs xquery
Amol Pujari
 
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
camp_drupal_ua
 

Was ist angesagt? (20)

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
 
MYSQL
MYSQLMYSQL
MYSQL
 
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
 
Introduction to php database connectivity
Introduction to php  database connectivityIntroduction to php  database connectivity
Introduction to php database connectivity
 
Geodaten & Drupal 7
Geodaten & Drupal 7Geodaten & Drupal 7
Geodaten & Drupal 7
 
Intro To jQuery In Drupal
Intro To jQuery In DrupalIntro To jQuery In Drupal
Intro To jQuery In Drupal
 
Drupal II: The SQL
Drupal II: The SQLDrupal II: The SQL
Drupal II: The SQL
 
2190 pertemuan24(polling)
2190 pertemuan24(polling)2190 pertemuan24(polling)
2190 pertemuan24(polling)
 
Phase2 OpenPublish Presentation SF SemWeb Meetup, April 28, 2009
Phase2 OpenPublish Presentation SF SemWeb Meetup, April 28, 2009Phase2 OpenPublish Presentation SF SemWeb Meetup, April 28, 2009
Phase2 OpenPublish Presentation SF SemWeb Meetup, April 28, 2009
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
 
The History and Future of Drupal Theming.
The History and Future of Drupal Theming.The History and Future of Drupal Theming.
The History and Future of Drupal Theming.
 
Drupal 7 — Circle theme
Drupal 7 — Circle themeDrupal 7 — Circle theme
Drupal 7 — Circle theme
 
Zf Zend Db by aida
Zf Zend Db by aidaZf Zend Db by aida
Zf Zend Db by aida
 
Mysql & Php
Mysql & PhpMysql & Php
Mysql & Php
 
Drupal Step-by-Step: How We Built Our Training Site, Part 1
Drupal Step-by-Step: How We Built Our Training Site, Part 1Drupal Step-by-Step: How We Built Our Training Site, Part 1
Drupal Step-by-Step: How We Built Our Training Site, Part 1
 
Mysql Ppt
Mysql PptMysql Ppt
Mysql Ppt
 
Sqlxml vs xquery
Sqlxml vs xquerySqlxml vs xquery
Sqlxml vs xquery
 
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
Goodbye hook_menu() - Routing and Menus in Drupal 8
Goodbye hook_menu() - Routing and Menus in Drupal 8Goodbye hook_menu() - Routing and Menus in Drupal 8
Goodbye hook_menu() - Routing and Menus in Drupal 8
 

Ähnlich wie Changes to Drupal Themes in version 7 (part 1)

Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricks
aaroncouch
 
Drupal 8: Theming
Drupal 8: ThemingDrupal 8: Theming
Drupal 8: Theming
drubb
 
Theming Drupal: Beyond the Look and Feel
Theming Drupal: Beyond the Look and FeelTheming Drupal: Beyond the Look and Feel
Theming Drupal: Beyond the Look and Feel
Chris Albrecht
 

Ähnlich wie Changes to Drupal Themes in version 7 (part 1) (20)

D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - London
 
8 things to know about theming in drupal 8
8 things to know about theming in drupal 88 things to know about theming in drupal 8
8 things to know about theming in drupal 8
 
Drupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of FrontendDrupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of Frontend
 
Kickass
KickassKickass
Kickass
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 
Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
 
Building Drupal 6 Theme
Building Drupal 6 ThemeBuilding Drupal 6 Theme
Building Drupal 6 Theme
 
Fronteers - Drupal 7 ux
Fronteers   - Drupal 7 uxFronteers   - Drupal 7 ux
Fronteers - Drupal 7 ux
 
Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricks
 
Drupal theme development
Drupal theme developmentDrupal theme development
Drupal theme development
 
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
 
Drupal 8: Theming
Drupal 8: ThemingDrupal 8: Theming
Drupal 8: Theming
 
Drupal 8 版型開發變革
Drupal 8 版型開發變革Drupal 8 版型開發變革
Drupal 8 版型開發變革
 
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
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
 
Drupal Theme Development
Drupal Theme DevelopmentDrupal Theme Development
Drupal Theme Development
 
Drupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritenceDrupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritence
 
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)
 
Theming Drupal: Beyond the Look and Feel
Theming Drupal: Beyond the Look and FeelTheming Drupal: Beyond the Look and Feel
Theming Drupal: Beyond the Look and Feel
 

Mehr von Chris Charlton

Lightning Talk: Drush aliases (Drupal Camp LA 2013)
Lightning Talk: Drush aliases (Drupal Camp LA 2013)Lightning Talk: Drush aliases (Drupal Camp LA 2013)
Lightning Talk: Drush aliases (Drupal Camp LA 2013)
Chris Charlton
 
Site Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
Site Aliases: Powerful Drupal Administration Using Drush by Chris CharltonSite Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
Site Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
Chris Charlton
 
Policy File: Powerful Drupal Administration Using Drush
Policy File: Powerful Drupal Administration Using DrushPolicy File: Powerful Drupal Administration Using Drush
Policy File: Powerful Drupal Administration Using Drush
Chris Charlton
 

Mehr von Chris Charlton (11)

Drupal Form API 101 (PHP) - DrupalCamp LA 2012
Drupal Form API 101 (PHP) - DrupalCamp LA 2012Drupal Form API 101 (PHP) - DrupalCamp LA 2012
Drupal Form API 101 (PHP) - DrupalCamp LA 2012
 
Drupal Developer Skills (2012) - DrupalCamp LA 2012
Drupal Developer Skills (2012) - DrupalCamp LA 2012Drupal Developer Skills (2012) - DrupalCamp LA 2012
Drupal Developer Skills (2012) - DrupalCamp LA 2012
 
Sassy CSS (part 2) (Drupal Camp LA 2013)
Sassy CSS (part 2) (Drupal Camp LA 2013)Sassy CSS (part 2) (Drupal Camp LA 2013)
Sassy CSS (part 2) (Drupal Camp LA 2013)
 
Lightning Talk: Drush aliases (Drupal Camp LA 2013)
Lightning Talk: Drush aliases (Drupal Camp LA 2013)Lightning Talk: Drush aliases (Drupal Camp LA 2013)
Lightning Talk: Drush aliases (Drupal Camp LA 2013)
 
Site Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
Site Aliases: Powerful Drupal Administration Using Drush by Chris CharltonSite Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
Site Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
 
Policy File: Powerful Drupal Administration Using Drush
Policy File: Powerful Drupal Administration Using DrushPolicy File: Powerful Drupal Administration Using Drush
Policy File: Powerful Drupal Administration Using Drush
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
 
Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...
 
Let's Zen! (Stop Theming From Scratch)
Let's Zen! (Stop Theming From Scratch)Let's Zen! (Stop Theming From Scratch)
Let's Zen! (Stop Theming From Scratch)
 
Flex Flash Air Interfaces for Custom Content Types in Drupal Chris Charlton
Flex Flash Air Interfaces for Custom Content Types in Drupal   Chris CharltonFlex Flash Air Interfaces for Custom Content Types in Drupal   Chris Charlton
Flex Flash Air Interfaces for Custom Content Types in Drupal Chris Charlton
 
Better Drupal Interaction Design with Flex
Better Drupal Interaction Design with FlexBetter Drupal Interaction Design with Flex
Better Drupal Interaction Design with Flex
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Changes to Drupal Themes in version 7 (part 1)