SlideShare a Scribd company logo
Drupal Theming
by
Arshad Vayani
Theme Engine
• Drupal’s theme directory also has an engines
directory that contains a theme engine called
PHPTemplate.
• Theme engines provide an easy way to separate
themable output into template files as opposed to
plain old PHP.
• The main benefit of using the PHPTemplate engine is
that separating logic from presentation is simplified.
Theme Engine
• While other theme engines such as
Smarty, XTemplate, and PHPTal may be used.
• PHPTemplate is Drupal’s default theme engine and is by
far the most popular theme engine used by Drupal
themes.

• It is also possible to write pure PHP Drupal themes. See
the Chameleon theme for an example of a pure PHP
theme at http://drupal.org/project/chameleon.
• For a full listing of available theme engines, visit
http://drupal.org/project/theme+engines.
Basic Theme Requirements
• A new folder with theme name under
sites/all/themes .
An .info file with following contents
name = Theme Name
description = Some description here
core = 7.x
Regions
Regions
Default Regions
• Drupal core defines nine regions for themes to utilize
programmatically by default.
• Until a theme defines its own regions, Drupal will use
the defaults.
• This means that if the default regions are sufficient
for your design, you will not need to define regions in
your theme’s .info file.
Default Regions
regions[page_top] = Page Top
regions[header] = Header
regions[highlighted] = Highlighted
regions[help] = Help
regions[content] = Content
regions[sidebar_first] = Sidebar First
regions[sidebar_second] = Sidebar Second
regions[footer] = Footer
regions[page_bottom] = Page Bottom
Default Regions
; CORE REGIONS - DISABLED
;regions[highlighted] = Highlighted
;regions[help] = Help
;regions[header] = Header
;regions[footer] = Footer
; CORE REGIONS - REQUIRED
regions[page_top] = Page Top
regions[content] = Content
regions[page_bottom] = Page Bottom
; CORE REGIONS
regions[sidebar_first] = Sidebar First
regions[sidebar_second] = Sidebar Second

; CUSTOM REGIONS
regions[my_custom_region] = My Custom Region
Default Regions
Common Core Templates
Common Core Templates
Overriding Template Files
• Find the original template file by browsing through
code or checking http://api.drupal.org
• Copy and paste it into your theme directory.
• Clear the site cache and reload!
Global Template Variables
Global Template Variables
Subtheme
• Start by creating the shell of a new theme. Create a
directory for it, and create the .info file containing at least
the name and core properties.
• In the .info file, add the “base theme” property containing
the name of the theme you want to use as a base, like so:
base theme = basethemename
• If the base theme has regions and/or features defined in
the .info file, you’ll need to copy those to the subtheme as
well.

More Related Content

Viewers also liked

Entre la conservación de la naturaleza y el bienestar humano: Maneras de lleg...
Entre la conservación de la naturaleza y el bienestar humano: Maneras de lleg...Entre la conservación de la naturaleza y el bienestar humano: Maneras de lleg...
Entre la conservación de la naturaleza y el bienestar humano: Maneras de lleg...
Marta Donadei
 
Metricas Twitter
Metricas TwitterMetricas Twitter
Metricas Twitter
Roberto aLoureiro
 
Mas afinal o que é a lógica? 2
Mas afinal o que é a lógica? 2Mas afinal o que é a lógica? 2
Mas afinal o que é a lógica? 2Joaquim Melro
 
Acta pleno 20131213
Acta pleno 20131213Acta pleno 20131213
Acta pleno 20131213
santamariadelparamo.com
 
Integracioneconomica17 sept
Integracioneconomica17 septIntegracioneconomica17 sept
Integracioneconomica17 sept
Isabel Betancur
 
04 arquivo
04   arquivo04   arquivo
04 arquivo
Alexandre Ribeiro
 
Revista literatas edição 4
Revista literatas   edição 4Revista literatas   edição 4
Revista literatas edição 4
Eng. Marcelo Soriano
 
User story mapping para planejamento de produtos interativos (ambiente ágil)
User story mapping para planejamento de produtos interativos (ambiente ágil)User story mapping para planejamento de produtos interativos (ambiente ágil)
User story mapping para planejamento de produtos interativos (ambiente ágil)
Karine Drumond
 
Undp 3 Eng
Undp 3 EngUndp 3 Eng
Undp 3 Eng
Luís Costa
 
From Research to Revenue IV: Capturing Business Opportunities in Asia
From Research to Revenue IV: Capturing Business Opportunities in AsiaFrom Research to Revenue IV: Capturing Business Opportunities in Asia
From Research to Revenue IV: Capturing Business Opportunities in Asia
GHBN
 
praktikum.ch Katalog 2014
praktikum.ch Katalog 2014praktikum.ch Katalog 2014
praktikum.ch Katalog 2014
praktikum_ch
 
AdMedika (HiSys)
AdMedika (HiSys)AdMedika (HiSys)
AdMedika (HiSys)
Rizal Maidin
 
Parte 7
Parte 7Parte 7
Parte 7
biancadempeo
 
Bài giảng xác suất thống kê
Bài giảng xác suất thống kêBài giảng xác suất thống kê
Bài giảng xác suất thống kêHọc Huỳnh Bá
 
Dynamics CRM 2013: Create or customize dashboards
Dynamics CRM 2013: Create or customize dashboardsDynamics CRM 2013: Create or customize dashboards
Dynamics CRM 2013: Create or customize dashboards
Vinh Nguyen
 
Potable Spirits Certified Under EAS 109
Potable Spirits Certified Under EAS 109Potable Spirits Certified Under EAS 109
Potable Spirits Certified Under EAS 109
The Star Newspaper
 
3 Estimation
3 Estimation3 Estimation
3 Estimation
tuomasniinimaki
 
Nazifascismo
Nazifascismo Nazifascismo
Nazifascismo
KellyCarvalho2011
 
Parten’s stages of play revised
Parten’s stages of play   revisedParten’s stages of play   revised
Parten’s stages of play revised
theresabrown1441
 
The Drupal Ecosystem for Drupal Services
The Drupal Ecosystem for Drupal ServicesThe Drupal Ecosystem for Drupal Services
The Drupal Ecosystem for Drupal Services
Vardot
 

Viewers also liked (20)

Entre la conservación de la naturaleza y el bienestar humano: Maneras de lleg...
Entre la conservación de la naturaleza y el bienestar humano: Maneras de lleg...Entre la conservación de la naturaleza y el bienestar humano: Maneras de lleg...
Entre la conservación de la naturaleza y el bienestar humano: Maneras de lleg...
 
Metricas Twitter
Metricas TwitterMetricas Twitter
Metricas Twitter
 
Mas afinal o que é a lógica? 2
Mas afinal o que é a lógica? 2Mas afinal o que é a lógica? 2
Mas afinal o que é a lógica? 2
 
Acta pleno 20131213
Acta pleno 20131213Acta pleno 20131213
Acta pleno 20131213
 
Integracioneconomica17 sept
Integracioneconomica17 septIntegracioneconomica17 sept
Integracioneconomica17 sept
 
04 arquivo
04   arquivo04   arquivo
04 arquivo
 
Revista literatas edição 4
Revista literatas   edição 4Revista literatas   edição 4
Revista literatas edição 4
 
User story mapping para planejamento de produtos interativos (ambiente ágil)
User story mapping para planejamento de produtos interativos (ambiente ágil)User story mapping para planejamento de produtos interativos (ambiente ágil)
User story mapping para planejamento de produtos interativos (ambiente ágil)
 
Undp 3 Eng
Undp 3 EngUndp 3 Eng
Undp 3 Eng
 
From Research to Revenue IV: Capturing Business Opportunities in Asia
From Research to Revenue IV: Capturing Business Opportunities in AsiaFrom Research to Revenue IV: Capturing Business Opportunities in Asia
From Research to Revenue IV: Capturing Business Opportunities in Asia
 
praktikum.ch Katalog 2014
praktikum.ch Katalog 2014praktikum.ch Katalog 2014
praktikum.ch Katalog 2014
 
AdMedika (HiSys)
AdMedika (HiSys)AdMedika (HiSys)
AdMedika (HiSys)
 
Parte 7
Parte 7Parte 7
Parte 7
 
Bài giảng xác suất thống kê
Bài giảng xác suất thống kêBài giảng xác suất thống kê
Bài giảng xác suất thống kê
 
Dynamics CRM 2013: Create or customize dashboards
Dynamics CRM 2013: Create or customize dashboardsDynamics CRM 2013: Create or customize dashboards
Dynamics CRM 2013: Create or customize dashboards
 
Potable Spirits Certified Under EAS 109
Potable Spirits Certified Under EAS 109Potable Spirits Certified Under EAS 109
Potable Spirits Certified Under EAS 109
 
3 Estimation
3 Estimation3 Estimation
3 Estimation
 
Nazifascismo
Nazifascismo Nazifascismo
Nazifascismo
 
Parten’s stages of play revised
Parten’s stages of play   revisedParten’s stages of play   revised
Parten’s stages of play revised
 
The Drupal Ecosystem for Drupal Services
The Drupal Ecosystem for Drupal ServicesThe Drupal Ecosystem for Drupal Services
The Drupal Ecosystem for Drupal Services
 

Similar to Drupal theming

Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for Developers
Ian Carnaghan
 
Design to Theme @ CMSExpo
Design to Theme @ CMSExpoDesign to Theme @ CMSExpo
Design to Theme @ CMSExpo
Emma Jane Hogbin Westby
 
Building Drupal 6 Theme
Building Drupal 6 ThemeBuilding Drupal 6 Theme
Building Drupal 6 Theme
Gaurav Khambhala
 
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
 
Introduction to Drupal (7) Theming
Introduction to Drupal (7) ThemingIntroduction to Drupal (7) Theming
Introduction to Drupal (7) Theming
Robert Carr
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme development
Naeem Junejo
 
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
Philip Norton
 
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
 
Readme
ReadmeReadme
Readme
jsutcliffe
 
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
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Emma Jane Hogbin Westby
 
PSD to Drupal - Introductory Drupal Theming
PSD to Drupal - Introductory Drupal ThemingPSD to Drupal - Introductory Drupal Theming
PSD to Drupal - Introductory Drupal Theming
sheenadonnelly
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
heatherrumd
 
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
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
Lauren Roth
 
Atlanta Drupal User Group (ADUG)
Atlanta Drupal User Group (ADUG) Atlanta Drupal User Group (ADUG)
Atlanta Drupal User Group (ADUG)
Mediacurrent
 
Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricks
aaroncouch
 
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
 

Similar to Drupal theming (20)

Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for Developers
 
Design to Theme @ CMSExpo
Design to Theme @ CMSExpoDesign to Theme @ CMSExpo
Design to Theme @ CMSExpo
 
Building Drupal 6 Theme
Building Drupal 6 ThemeBuilding Drupal 6 Theme
Building Drupal 6 Theme
 
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
 
Introduction to Drupal (7) Theming
Introduction to Drupal (7) ThemingIntroduction to Drupal (7) Theming
Introduction to Drupal (7) Theming
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme development
 
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
 
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
 
Readme
ReadmeReadme
Readme
 
Drupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotechDrupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotech
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010
 
PSD to Drupal - Introductory Drupal Theming
PSD to Drupal - Introductory Drupal ThemingPSD to Drupal - Introductory Drupal Theming
PSD to Drupal - Introductory Drupal Theming
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
 
Drupal theme development
Drupal theme developmentDrupal theme development
Drupal theme development
 
Drupal Theme Development
Drupal Theme DevelopmentDrupal Theme Development
Drupal Theme Development
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Atlanta Drupal User Group (ADUG)
Atlanta Drupal User Group (ADUG) Atlanta Drupal User Group (ADUG)
Atlanta Drupal User Group (ADUG)
 
Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricks
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 

Recently uploaded

What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
Vadym Kazulkin
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 

Recently uploaded (20)

What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 

Drupal theming

  • 2. Theme Engine • Drupal’s theme directory also has an engines directory that contains a theme engine called PHPTemplate. • Theme engines provide an easy way to separate themable output into template files as opposed to plain old PHP. • The main benefit of using the PHPTemplate engine is that separating logic from presentation is simplified.
  • 3. Theme Engine • While other theme engines such as Smarty, XTemplate, and PHPTal may be used. • PHPTemplate is Drupal’s default theme engine and is by far the most popular theme engine used by Drupal themes. • It is also possible to write pure PHP Drupal themes. See the Chameleon theme for an example of a pure PHP theme at http://drupal.org/project/chameleon. • For a full listing of available theme engines, visit http://drupal.org/project/theme+engines.
  • 4. Basic Theme Requirements • A new folder with theme name under sites/all/themes . An .info file with following contents name = Theme Name description = Some description here core = 7.x
  • 7. Default Regions • Drupal core defines nine regions for themes to utilize programmatically by default. • Until a theme defines its own regions, Drupal will use the defaults. • This means that if the default regions are sufficient for your design, you will not need to define regions in your theme’s .info file.
  • 8. Default Regions regions[page_top] = Page Top regions[header] = Header regions[highlighted] = Highlighted regions[help] = Help regions[content] = Content regions[sidebar_first] = Sidebar First regions[sidebar_second] = Sidebar Second regions[footer] = Footer regions[page_bottom] = Page Bottom
  • 9. Default Regions ; CORE REGIONS - DISABLED ;regions[highlighted] = Highlighted ;regions[help] = Help ;regions[header] = Header ;regions[footer] = Footer ; CORE REGIONS - REQUIRED regions[page_top] = Page Top regions[content] = Content regions[page_bottom] = Page Bottom ; CORE REGIONS regions[sidebar_first] = Sidebar First regions[sidebar_second] = Sidebar Second ; CUSTOM REGIONS regions[my_custom_region] = My Custom Region
  • 13. Overriding Template Files • Find the original template file by browsing through code or checking http://api.drupal.org • Copy and paste it into your theme directory. • Clear the site cache and reload!
  • 16. Subtheme • Start by creating the shell of a new theme. Create a directory for it, and create the .info file containing at least the name and core properties. • In the .info file, add the “base theme” property containing the name of the theme you want to use as a base, like so: base theme = basethemename • If the base theme has regions and/or features defined in the .info file, you’ll need to copy those to the subtheme as well.