SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
1
DEMYSTIFYING DRUPAL 7
THEMING
AND FRONT END DEVELOPMENT WITH DRUPAL
Presented by /
Company /
A web, mobile, Drupal design and development services provider based in Lagos, Nigeria,
Phone: 081 7608 4053 Email: info@icelark.com
Tony N. Ogbonna (CEO/Developer Icelark Projects) @togbonna
Icelark Projects (www.icelark.com) @icelarkProjects
2
INTRODUCTION
This is a session on the basics of Drupal 7 themeing and front-end customization
of a Drupal 7 website.
This training session is targeted as intermediate to advanced Drupal user. (Sharp
beginners might also benefit)
The objectives of this session are two fold:
First is to impress on you a fundamental knowledge of the Drupal theme system
and an understanding of how it works.
Second is to empower you with a knowledge of how you might start to use the
power and flexibility of the Drupal theme system to easily customize the look and
feel of a Drupal website.
3
WHAT IS THEMING?
Simply, it is the act of changing the appearance/look and feel of a Drupal website
to suite your taste, requirements or style.
Theming is made up of different pieces:
1. Designing the appearance of your website: Photoshop, Fireworks, wireframes,
pen and papers, etc
2. Creating the HTML to contro the layout of your website
3. Changing the HTML output of Drupal to fit your design. ie Modifying the HTML
outputed by Drupal to conform to the HTML you need (The haredst part)
4. Much more...
4
OUR ASSUMPTIONS...
Basic knowledge of HTML, CSS and PHP
5 . 1
BASICS OF DRUPAL 7 THEMING
The "Drupal Theme Layer" and the theme that uses it are responsible for the look
and feel of a Drupal website.
A good theme consists of all the same elements that you would find on any
respectable website.
This includes standards-compliant HTML markup, CSS, Javascripts, images and
all other components that make the user interface.
How all of these elements are put together into a Drupal website is what makes
the Drupal so flexible and powerful.
5 . 2
BASICS OF DRUPAL 7 THEMING...
A Drupal theme can be as simple or as complex as you want it to be.
A Drupal theme has the ultimate control over every aspect of each page of a
website.
So, like Drupal itself, themes are flexible and powerful.
But for you to be able to take full advantage of all that power and flexibility you
have to be able to understand how a theme works under the hood.
5 . 3
THE DRUPAL CORE THEMES
The core theme directory.
The core themes: Batik, Garland, Seven, Stark
Theme Engines.
5 . 4
DRUPAL THEME ADMINISTRATION
Enabling and setting as default
Adminstration theme
Global theme setting
Installing a new theme
6
HOW THE DRUPAL THEME SYSTEM WORKS
1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES
7 . 1
7 . 2
1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES
.info file (Required)
template files (.tpl.php files)
Resource files: CSS, Javascripts, images, logo, screenshot
7 . 3
1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES
template files (.tpl.php files)
are used for the HTML markup and PHP variables
Each .tpl.php file handles the output of a specific themable chunk of data
This makes it fairly easy for those with little or no PHP experience to make
changes to HTML code.
They are optional, and if none exists in your theme it will fall back to the default
output
1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES
template files (.tpl.php files)
7 . 47 . 5
1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES
template.php file
are used for the HTML markup and PHP variables
Each .tpl.php file handles the output of a specific themable chunk of data
They are optional, and if none exists in your theme it will fall back to the default
output
7 . 6
1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES
Resource files: CSS, Javascripts, images, logo, screenshot
8 . 1
2. TEMPLATE FILES HIERARCHY
9 . 1
3. ANATOMY OF THE .INFO FILE
The .info file is a static text file for defining and configuring a theme
Each line in the .info file is a key-value pair
10 . 1
4. REGIONS
Most of the content found on Drupal pages is output inside a region
Typical regions include the header, footer, sidebars, and content
these regions often play a large part in defining the high-level structure of your
HTML markup
An option appears in the blocks interface at admin/structure/block for each
region, allowing site administrators to control and position the blocks inside them
4. REGIONS
10 . 2
4. REGIONS
10 . 311 . 1
5. THEME SETTINGS AND HOW THEY ARE USED
Various page elements output by the theme can be toggled on and off on the
theme's configuration page
12 . 1
6. THEME CACHE
13 . 1
7. CREATING A SUB-THEME
Sub-themes are just like any other theme, with one difference: They inherit the
parent theme's resources
Style sheet inheritance: All style sheets defined in the parent theme will be
inherited.
JavaScript inheritance: All JavaScripts defined in the parent theme will be
inherited.
To set Toggle Display of Theme: Overriding or adding features: Specify a new
feature in sub-theme's .info file.
Template.php function inheritance: Anything defined in the parent theme's
template.php file will be inherited.
13 . 2
7. CREATING A SUB-THEME
Page, node, block and other template (.tpl.php) file inheritance: Any .tpl.php files
from the parent theme will be inherited.
Screen shots, logo and favicon inheritance: The parent theme's screen shot will be
inherited. The parent theme's logo (logo.png/logo.jpg) will not be inherited. The
parent theme's favicon (favicon.ico) will not be inherited.
Region inheritance: Sub-themes do not inherit custom regions from a parent
theme,If you are using custom regions, you should copy the region declarations
from the parent theme's .info file
14
ADVANCED THEMING (FURTHER EXPLORATION)
Theme layer variables
Preprocess and process functions
Render API
Theming forms
Managing CSS files
Working with base and sub themes
Sustainability and best practices (SASS techniques and tools).
15
-
THE END
- |
-
www.drupal.org www.drupal.com
www.DrupalNigeia org
- A Presentation of Icelark Projects
- www.icelark.com
@icelarkProjects

Weitere ähnliche Inhalte

Was ist angesagt?

DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
Drupaltour
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
Mediacurrent
 

Was ist angesagt? (16)

Drupal 6 Overview
Drupal 6 OverviewDrupal 6 Overview
Drupal 6 Overview
 
Drupal Theming
Drupal Theming Drupal Theming
Drupal Theming
 
Theming in Drupal 8 (everything)
Theming in Drupal 8 (everything)Theming in Drupal 8 (everything)
Theming in Drupal 8 (everything)
 
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
 
Presentation on timeline
Presentation on timelinePresentation on timeline
Presentation on timeline
 
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the BasicsUpgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
 
Drupal 8 introduction to theming
Drupal 8  introduction to themingDrupal 8  introduction to theming
Drupal 8 introduction to theming
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 
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
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
 
JSN Decor Customization Manual
JSN Decor Customization ManualJSN Decor Customization Manual
JSN Decor Customization Manual
 
Awetive template document
Awetive template documentAwetive template document
Awetive template document
 
JSN Decor Configuration Manual
JSN Decor Configuration ManualJSN Decor Configuration Manual
JSN Decor Configuration Manual
 
Sustainable Drupal Theming with Fusion
Sustainable Drupal Theming with FusionSustainable Drupal Theming with Fusion
Sustainable Drupal Theming with Fusion
 
Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep dive
 

Andere mochten auch

03 impresiones, alginatos y yesos
03 impresiones, alginatos y yesos03 impresiones, alginatos y yesos
03 impresiones, alginatos y yesos
A-estudiar
 
Ap3
Ap3Ap3
Ap3
H L
 
Making Wordpress Blog
Making Wordpress BlogMaking Wordpress Blog
Making Wordpress Blog
chirtoomaung
 
Radar Camuflado
Radar CamufladoRadar Camuflado
Radar Camuflado
pierobj
 

Andere mochten auch (20)

Steve Bashford: Post-recession occupations and sectors in the South West
Steve Bashford: Post-recession occupations and sectors in the South WestSteve Bashford: Post-recession occupations and sectors in the South West
Steve Bashford: Post-recession occupations and sectors in the South West
 
Pearson social media survey 2011
Pearson social media survey 2011Pearson social media survey 2011
Pearson social media survey 2011
 
MA Oil Tank Upgrade Law
MA Oil Tank Upgrade LawMA Oil Tank Upgrade Law
MA Oil Tank Upgrade Law
 
Local Investment Planning - Where are we now? (Colin Molton, HCA)
Local Investment Planning - Where are we now? (Colin Molton, HCA)Local Investment Planning - Where are we now? (Colin Molton, HCA)
Local Investment Planning - Where are we now? (Colin Molton, HCA)
 
R2 a2b-russian history year 5, class 2, 2012 - 2013 gorbachev
R2 a2b-russian history year 5, class 2, 2012 - 2013 gorbachevR2 a2b-russian history year 5, class 2, 2012 - 2013 gorbachev
R2 a2b-russian history year 5, class 2, 2012 - 2013 gorbachev
 
E 3-2012-ancient egypt year 5 - class 3- nubia
E 3-2012-ancient egypt year 5 - class 3- nubiaE 3-2012-ancient egypt year 5 - class 3- nubia
E 3-2012-ancient egypt year 5 - class 3- nubia
 
03 impresiones, alginatos y yesos
03 impresiones, alginatos y yesos03 impresiones, alginatos y yesos
03 impresiones, alginatos y yesos
 
Ap3
Ap3Ap3
Ap3
 
Outbound Licensing Strategies: Is Open Source the Right Model for Your Company?
Outbound Licensing Strategies: Is Open Source the Right Model for Your Company?Outbound Licensing Strategies: Is Open Source the Right Model for Your Company?
Outbound Licensing Strategies: Is Open Source the Right Model for Your Company?
 
2010 Giving Survey
2010 Giving Survey2010 Giving Survey
2010 Giving Survey
 
2
22
2
 
Proposal
ProposalProposal
Proposal
 
Making Wordpress Blog
Making Wordpress BlogMaking Wordpress Blog
Making Wordpress Blog
 
Referentiecase ODH | ICreative
Referentiecase ODH | ICreativeReferentiecase ODH | ICreative
Referentiecase ODH | ICreative
 
Social Web 5
Social Web 5Social Web 5
Social Web 5
 
Oral Culture and Library Acquisition
Oral Culture and Library AcquisitionOral Culture and Library Acquisition
Oral Culture and Library Acquisition
 
Ch 2 Sec 1
Ch 2 Sec 1Ch 2 Sec 1
Ch 2 Sec 1
 
Business Info Engl1
Business Info Engl1Business Info Engl1
Business Info Engl1
 
Radar Camuflado
Radar CamufladoRadar Camuflado
Radar Camuflado
 
R3 a3-2012 russian history gorbachev to putin class three yelsin 2012 - 2013
R3 a3-2012 russian history gorbachev to putin class three yelsin 2012 - 2013R3 a3-2012 russian history gorbachev to putin class three yelsin 2012 - 2013
R3 a3-2012 russian history gorbachev to putin class three yelsin 2012 - 2013
 

Ähnlich wie Demystifying drupal 7 theming

Theming Drupal 6 - An Introduction to the Basics
Theming Drupal 6 - An Introduction to the BasicsTheming Drupal 6 - An Introduction to the Basics
Theming Drupal 6 - An Introduction to the Basics
Erik Baldwin
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
Lauren Roth
 
Drupal theming 101
Drupal theming 101Drupal theming 101
Drupal theming 101
Exove
 

Ähnlich wie Demystifying drupal 7 theming (20)

Drupal theme development
Drupal theme developmentDrupal theme development
Drupal theme development
 
Drupal
DrupalDrupal
Drupal
 
Drupal Theme Development
Drupal Theme DevelopmentDrupal Theme Development
Drupal Theme Development
 
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
 
Theming Drupal 6 - An Introduction to the Basics
Theming Drupal 6 - An Introduction to the BasicsTheming Drupal 6 - An Introduction to the Basics
Theming Drupal 6 - An Introduction to the Basics
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend development
 
Architecture of Drupal - Drupal Camp
Architecture of Drupal - Drupal CampArchitecture of Drupal - Drupal Camp
Architecture of Drupal - Drupal Camp
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
 
Evaluating Base Themes
Evaluating Base ThemesEvaluating Base Themes
Evaluating Base Themes
 
Drupal 6 Theming
Drupal 6 ThemingDrupal 6 Theming
Drupal 6 Theming
 
Building Websites of the Future With Drupal 7
Building Websites of the Future With Drupal 7Building Websites of the Future With Drupal 7
Building Websites of the Future With Drupal 7
 
Building Websites of the Future With Drupal 7
Building Websites of the Future With Drupal 7Building Websites of the Future With Drupal 7
Building Websites of the Future With Drupal 7
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for Developers
 
I Heart Drupal
I Heart DrupalI Heart Drupal
I Heart Drupal
 
Introduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotechIntroduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotech
 
Drupal theming 101
Drupal theming 101Drupal theming 101
Drupal theming 101
 
Theming and content basics - Drupal Camp CT 2011
Theming and content basics - Drupal Camp CT 2011Theming and content basics - Drupal Camp CT 2011
Theming and content basics - Drupal Camp CT 2011
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 
Drupal Theming For Beginners – Danté SELF 2010
Drupal Theming For Beginners – Danté SELF 2010Drupal Theming For Beginners – Danté SELF 2010
Drupal Theming For Beginners – Danté SELF 2010
 

Kürzlich hochgeladen

Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
drm1699
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Marc Lester
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Lisi Hocke
 

Kürzlich hochgeladen (20)

CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with GraphGraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 

Demystifying drupal 7 theming

  • 1. 1 DEMYSTIFYING DRUPAL 7 THEMING AND FRONT END DEVELOPMENT WITH DRUPAL Presented by / Company / A web, mobile, Drupal design and development services provider based in Lagos, Nigeria, Phone: 081 7608 4053 Email: info@icelark.com Tony N. Ogbonna (CEO/Developer Icelark Projects) @togbonna Icelark Projects (www.icelark.com) @icelarkProjects
  • 2. 2 INTRODUCTION This is a session on the basics of Drupal 7 themeing and front-end customization of a Drupal 7 website. This training session is targeted as intermediate to advanced Drupal user. (Sharp beginners might also benefit) The objectives of this session are two fold: First is to impress on you a fundamental knowledge of the Drupal theme system and an understanding of how it works. Second is to empower you with a knowledge of how you might start to use the power and flexibility of the Drupal theme system to easily customize the look and feel of a Drupal website.
  • 3. 3 WHAT IS THEMING? Simply, it is the act of changing the appearance/look and feel of a Drupal website to suite your taste, requirements or style. Theming is made up of different pieces: 1. Designing the appearance of your website: Photoshop, Fireworks, wireframes, pen and papers, etc 2. Creating the HTML to contro the layout of your website 3. Changing the HTML output of Drupal to fit your design. ie Modifying the HTML outputed by Drupal to conform to the HTML you need (The haredst part) 4. Much more...
  • 5. 5 . 1 BASICS OF DRUPAL 7 THEMING The "Drupal Theme Layer" and the theme that uses it are responsible for the look and feel of a Drupal website. A good theme consists of all the same elements that you would find on any respectable website. This includes standards-compliant HTML markup, CSS, Javascripts, images and all other components that make the user interface. How all of these elements are put together into a Drupal website is what makes the Drupal so flexible and powerful.
  • 6. 5 . 2 BASICS OF DRUPAL 7 THEMING... A Drupal theme can be as simple or as complex as you want it to be. A Drupal theme has the ultimate control over every aspect of each page of a website. So, like Drupal itself, themes are flexible and powerful. But for you to be able to take full advantage of all that power and flexibility you have to be able to understand how a theme works under the hood.
  • 7. 5 . 3 THE DRUPAL CORE THEMES The core theme directory. The core themes: Batik, Garland, Seven, Stark Theme Engines.
  • 8. 5 . 4 DRUPAL THEME ADMINISTRATION Enabling and setting as default Adminstration theme Global theme setting Installing a new theme
  • 9. 6 HOW THE DRUPAL THEME SYSTEM WORKS
  • 10. 1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES
  • 11. 7 . 1
  • 12. 7 . 2 1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES .info file (Required) template files (.tpl.php files) Resource files: CSS, Javascripts, images, logo, screenshot
  • 13. 7 . 3 1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES template files (.tpl.php files) are used for the HTML markup and PHP variables Each .tpl.php file handles the output of a specific themable chunk of data This makes it fairly easy for those with little or no PHP experience to make changes to HTML code. They are optional, and if none exists in your theme it will fall back to the default output
  • 14. 1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES template files (.tpl.php files)
  • 15.
  • 16. 7 . 47 . 5 1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES template.php file are used for the HTML markup and PHP variables Each .tpl.php file handles the output of a specific themable chunk of data They are optional, and if none exists in your theme it will fall back to the default output
  • 17. 7 . 6 1. OVERVIEW OF THE THEME STRUCTURES AND THEME FILES Resource files: CSS, Javascripts, images, logo, screenshot
  • 18. 8 . 1 2. TEMPLATE FILES HIERARCHY
  • 19. 9 . 1 3. ANATOMY OF THE .INFO FILE The .info file is a static text file for defining and configuring a theme Each line in the .info file is a key-value pair
  • 20. 10 . 1 4. REGIONS Most of the content found on Drupal pages is output inside a region Typical regions include the header, footer, sidebars, and content these regions often play a large part in defining the high-level structure of your HTML markup An option appears in the blocks interface at admin/structure/block for each region, allowing site administrators to control and position the blocks inside them
  • 24.
  • 25. 10 . 311 . 1 5. THEME SETTINGS AND HOW THEY ARE USED Various page elements output by the theme can be toggled on and off on the theme's configuration page
  • 26. 12 . 1 6. THEME CACHE
  • 27. 13 . 1 7. CREATING A SUB-THEME Sub-themes are just like any other theme, with one difference: They inherit the parent theme's resources Style sheet inheritance: All style sheets defined in the parent theme will be inherited. JavaScript inheritance: All JavaScripts defined in the parent theme will be inherited. To set Toggle Display of Theme: Overriding or adding features: Specify a new feature in sub-theme's .info file. Template.php function inheritance: Anything defined in the parent theme's template.php file will be inherited.
  • 28. 13 . 2 7. CREATING A SUB-THEME Page, node, block and other template (.tpl.php) file inheritance: Any .tpl.php files from the parent theme will be inherited. Screen shots, logo and favicon inheritance: The parent theme's screen shot will be inherited. The parent theme's logo (logo.png/logo.jpg) will not be inherited. The parent theme's favicon (favicon.ico) will not be inherited. Region inheritance: Sub-themes do not inherit custom regions from a parent theme,If you are using custom regions, you should copy the region declarations from the parent theme's .info file
  • 29. 14 ADVANCED THEMING (FURTHER EXPLORATION) Theme layer variables Preprocess and process functions Render API Theming forms Managing CSS files Working with base and sub themes Sustainability and best practices (SASS techniques and tools).
  • 30. 15 - THE END - | - www.drupal.org www.drupal.com www.DrupalNigeia org - A Presentation of Icelark Projects - www.icelark.com @icelarkProjects