SlideShare a Scribd company logo
1 of 8
Creating an Initial
Custom Theme in
     Drupal
     by Troy Shields
      www.troyshields.com




                            1
Assumptions


• You understand how to:
 • Set up a Drupal site
 • Write HTML/CSS



                           2
The Situation
           What I Wish I Knew


• You’re a “Themer”
• You’re working with a team of    Explain my experience
                                   and “what I wish I
                                   knew”
  developers

• You’re working in tandem
• You need to get base styles & your
  regions in place for your developers


                                                           3
Understanding the Files


• sites/all/themes/yourthemename
 • .info file
 • logo.png, screenshot.png
 • stylesheets & tpls         Go over what’s in INFO
                              file:
                                   Name
                                   Regions
                                   CSS




                                                       4
Creating the Template
                                    Bad HTML and CSS are not
                                    Drupal’s fault. If it doesn’t
                                    work outside of Drupal, it
                                    won’t work inside of
                                    Drupal.

• Create a static template & test in
  browsers you support
                                    page-front/homepage is
                                    last because it’s a

• page.tpl.php should be the most   conglomeration of the
                                    rest of the site. Use as
                                    few page tpls as possible

  common page
                                    if nothing is in the

• Simple “if” statements for sidebars
                                    sidebar, it won’t show up.
                                    use body class to style
                                    columns appropriately



• Site Building: build what you know

                                                                    5
A Theory of CSS

• Understand Floating & Positioning. Holy Grail
• Absolutely position elements in headers with
  static heights. There are no mysteries here

• Columns need floats and widths, but rarely
  elements inside of them

• Use negative margins sparingly. This is often
  used as a band-aid on a gunshot wound



                                                  6
Wrap Up
                                     think: generic enough to
                                     contribute or use for
                                     another site.


• Build stuff you know. Columns,
  header, footer.
• Stuff you don’t know. Theming that
  relies on specific id’s and classes
  output by Drupal modules.
                                   This is stuff with id’s and
                                   classes you don’t know
                                   because they haven’t been
                                   built.




                                                                 7
The End.
Thanks.



           8

More Related Content

What's hot

Role of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-upRole of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-upAdrian Roselli
 
The Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-upThe Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-upAdrian Roselli
 
Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3John Bertucci
 
Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019Adrian Roselli
 
Designing hacks
Designing hacksDesigning hacks
Designing hacksjbcima
 
Better editorial experience in Drupal 7
Better editorial experience in Drupal 7Better editorial experience in Drupal 7
Better editorial experience in Drupal 7Boyan Borisov
 
Fundamentals of blogging
Fundamentals of bloggingFundamentals of blogging
Fundamentals of bloggingJeremy Blanton
 
SEO Horror Stories
SEO Horror StoriesSEO Horror Stories
SEO Horror Storiespointit
 
Best Practices for Business Blogging
Best Practices for Business BloggingBest Practices for Business Blogging
Best Practices for Business BloggingAndy Wibbels
 
Coding For Fun And Profit
Coding For Fun And ProfitCoding For Fun And Profit
Coding For Fun And Profitjschoolcraft
 
Web Accessibility Gone Wild
Web Accessibility Gone WildWeb Accessibility Gone Wild
Web Accessibility Gone WildJared Smith
 
Wrangling Themes: everything you need to know about WordPress themes
Wrangling Themes: everything you need to know about WordPress themesWrangling Themes: everything you need to know about WordPress themes
Wrangling Themes: everything you need to know about WordPress themesAlison Knott
 
Wrangling Themes: everything you need to know about WordPress themes
Wrangling Themes: everything you need to know about WordPress themesWrangling Themes: everything you need to know about WordPress themes
Wrangling Themes: everything you need to know about WordPress themesAlison Knott
 

What's hot (15)

Role of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-upRole of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-up
 
The Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-upThe Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-up
 
Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3
 
Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019
 
Designing hacks
Designing hacksDesigning hacks
Designing hacks
 
Better editorial experience in Drupal 7
Better editorial experience in Drupal 7Better editorial experience in Drupal 7
Better editorial experience in Drupal 7
 
Fundamentals of blogging
Fundamentals of bloggingFundamentals of blogging
Fundamentals of blogging
 
Blogging 101
Blogging 101Blogging 101
Blogging 101
 
SEO Horror Stories
SEO Horror StoriesSEO Horror Stories
SEO Horror Stories
 
Best Practices for Business Blogging
Best Practices for Business BloggingBest Practices for Business Blogging
Best Practices for Business Blogging
 
Coding For Fun And Profit
Coding For Fun And ProfitCoding For Fun And Profit
Coding For Fun And Profit
 
Tech Fair 2010
Tech Fair 2010Tech Fair 2010
Tech Fair 2010
 
Web Accessibility Gone Wild
Web Accessibility Gone WildWeb Accessibility Gone Wild
Web Accessibility Gone Wild
 
Wrangling Themes: everything you need to know about WordPress themes
Wrangling Themes: everything you need to know about WordPress themesWrangling Themes: everything you need to know about WordPress themes
Wrangling Themes: everything you need to know about WordPress themes
 
Wrangling Themes: everything you need to know about WordPress themes
Wrangling Themes: everything you need to know about WordPress themesWrangling Themes: everything you need to know about WordPress themes
Wrangling Themes: everything you need to know about WordPress themes
 

Viewers also liked (6)

ENoLL FAO Workshop Darko Ferčej
ENoLL FAO Workshop Darko FerčejENoLL FAO Workshop Darko Ferčej
ENoLL FAO Workshop Darko Ferčej
 
Jjjjj
JjjjjJjjjj
Jjjjj
 
Jatin
JatinJatin
Jatin
 
In ibama n° 31 2009 ctf nova
In ibama n° 31 2009 ctf novaIn ibama n° 31 2009 ctf nova
In ibama n° 31 2009 ctf nova
 
Acta de creación de AveAgua
Acta de creación de AveAgua Acta de creación de AveAgua
Acta de creación de AveAgua
 
Storyboard
StoryboardStoryboard
Storyboard
 

Similar to Building an Initial Custom Theme

Atlanta Drupal User Group (ADUG)
Atlanta Drupal User Group (ADUG) Atlanta Drupal User Group (ADUG)
Atlanta Drupal User Group (ADUG) Mediacurrent
 
New Adventures in Drupal Theming
New Adventures in Drupal ThemingNew Adventures in Drupal Theming
New Adventures in Drupal ThemingJohn Albin Wilkins
 
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Laura Scott
 
Drupal Aware Design: Good Techniques for Better Themes
Drupal Aware Design: Good Techniques for Better ThemesDrupal Aware Design: Good Techniques for Better Themes
Drupal Aware Design: Good Techniques for Better Themesnyccamp
 
Using Open Atrium in Your Organization
Using Open Atrium in Your OrganizationUsing Open Atrium in Your Organization
Using Open Atrium in Your OrganizationPhase2
 
Tenthingsivelearnedaboutdrupal 120130164528-phpapp02
Tenthingsivelearnedaboutdrupal 120130164528-phpapp02Tenthingsivelearnedaboutdrupal 120130164528-phpapp02
Tenthingsivelearnedaboutdrupal 120130164528-phpapp02Luisa Fernanda
 
Ten things i've learned about drupal
Ten things i've learned about drupalTen things i've learned about drupal
Ten things i've learned about drupalNina McHale
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectIztok Smolic
 
Child Theme Frameworks
Child Theme FrameworksChild Theme Frameworks
Child Theme Frameworksryngrn
 
Drupal theming 101
Drupal theming 101Drupal theming 101
Drupal theming 101Exove
 
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeMinimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeSuzanne Dergacheva
 
Drupal 7: Theming with Omega
Drupal 7: Theming with OmegaDrupal 7: Theming with Omega
Drupal 7: Theming with OmegaEric Sembrat
 
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...Mediacurrent
 
Default theme implementations: a guide for module developers that want sweet ...
Default theme implementations: a guide for module developers that want sweet ...Default theme implementations: a guide for module developers that want sweet ...
Default theme implementations: a guide for module developers that want sweet ...John Albin Wilkins
 
Intro to Drupal Slides - DrupalCampSC 2014
Intro to Drupal Slides - DrupalCampSC 2014Intro to Drupal Slides - DrupalCampSC 2014
Intro to Drupal Slides - DrupalCampSC 2014Sarah Shealy
 

Similar to Building an Initial Custom Theme (20)

Evaluating Base Themes
Evaluating Base ThemesEvaluating Base Themes
Evaluating Base Themes
 
Nanocon Taiwan
Nanocon TaiwanNanocon Taiwan
Nanocon Taiwan
 
Atlanta Drupal User Group (ADUG)
Atlanta Drupal User Group (ADUG) Atlanta Drupal User Group (ADUG)
Atlanta Drupal User Group (ADUG)
 
New Adventures in Drupal Theming
New Adventures in Drupal ThemingNew Adventures in Drupal Theming
New Adventures in Drupal Theming
 
Forensic Theming for Drupal
Forensic Theming for DrupalForensic Theming for Drupal
Forensic Theming for Drupal
 
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
 
Drupal Aware Design: Good Techniques for Better Themes
Drupal Aware Design: Good Techniques for Better ThemesDrupal Aware Design: Good Techniques for Better Themes
Drupal Aware Design: Good Techniques for Better Themes
 
Drupal 6 Theming
Drupal 6 ThemingDrupal 6 Theming
Drupal 6 Theming
 
Using Open Atrium in Your Organization
Using Open Atrium in Your OrganizationUsing Open Atrium in Your Organization
Using Open Atrium in Your Organization
 
Tenthingsivelearnedaboutdrupal 120130164528-phpapp02
Tenthingsivelearnedaboutdrupal 120130164528-phpapp02Tenthingsivelearnedaboutdrupal 120130164528-phpapp02
Tenthingsivelearnedaboutdrupal 120130164528-phpapp02
 
Ten things i've learned about drupal
Ten things i've learned about drupalTen things i've learned about drupal
Ten things i've learned about drupal
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal project
 
Child Theme Frameworks
Child Theme FrameworksChild Theme Frameworks
Child Theme Frameworks
 
Drupal theming 101
Drupal theming 101Drupal theming 101
Drupal theming 101
 
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeMinimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
 
Forensic Theming - DrupalCon London
Forensic Theming - DrupalCon LondonForensic Theming - DrupalCon London
Forensic Theming - DrupalCon London
 
Drupal 7: Theming with Omega
Drupal 7: Theming with OmegaDrupal 7: Theming with Omega
Drupal 7: Theming with Omega
 
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
 
Default theme implementations: a guide for module developers that want sweet ...
Default theme implementations: a guide for module developers that want sweet ...Default theme implementations: a guide for module developers that want sweet ...
Default theme implementations: a guide for module developers that want sweet ...
 
Intro to Drupal Slides - DrupalCampSC 2014
Intro to Drupal Slides - DrupalCampSC 2014Intro to Drupal Slides - DrupalCampSC 2014
Intro to Drupal Slides - DrupalCampSC 2014
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Building an Initial Custom Theme

  • 1. Creating an Initial Custom Theme in Drupal by Troy Shields www.troyshields.com 1
  • 2. Assumptions • You understand how to: • Set up a Drupal site • Write HTML/CSS 2
  • 3. The Situation What I Wish I Knew • You’re a “Themer” • You’re working with a team of Explain my experience and “what I wish I knew” developers • You’re working in tandem • You need to get base styles & your regions in place for your developers 3
  • 4. Understanding the Files • sites/all/themes/yourthemename • .info file • logo.png, screenshot.png • stylesheets & tpls Go over what’s in INFO file: Name Regions CSS 4
  • 5. Creating the Template Bad HTML and CSS are not Drupal’s fault. If it doesn’t work outside of Drupal, it won’t work inside of Drupal. • Create a static template & test in browsers you support page-front/homepage is last because it’s a • page.tpl.php should be the most conglomeration of the rest of the site. Use as few page tpls as possible common page if nothing is in the • Simple “if” statements for sidebars sidebar, it won’t show up. use body class to style columns appropriately • Site Building: build what you know 5
  • 6. A Theory of CSS • Understand Floating & Positioning. Holy Grail • Absolutely position elements in headers with static heights. There are no mysteries here • Columns need floats and widths, but rarely elements inside of them • Use negative margins sparingly. This is often used as a band-aid on a gunshot wound 6
  • 7. Wrap Up think: generic enough to contribute or use for another site. • Build stuff you know. Columns, header, footer. • Stuff you don’t know. Theming that relies on specific id’s and classes output by Drupal modules. This is stuff with id’s and classes you don’t know because they haven’t been built. 7