Drupal Theme Development
Introduction
0.1.
Table of Contents
0.2.
License
1.
Theming
1.1.
The Core Themes Directory
1.2.
Theme Administration
1.3.
Theme Metadata (.info Files)
1.4.
Working with Regions
1.5.
Template Files
1.6.
Theme Functions
1.7.
Theme Hooks and Suggestions
1.8.
Summary
2.
Advanced Theming
2.1.
Finding Available Variables in the Theme Layer
2.2.
Preprocess and Process Functions
2.3.
Using the Render API
2.4.
Theming Forms
2.5.
Managing CSS Files
2.6.
Working with Base and Subthemes
2.7.
Sustainability and Best Practices
2.8.
Summary
Powered by
GitBook
A
A
Serif
Sans
White
Sepia
Night
Share on Twitter
Share on Google
Share on Facebook
Share on Weibo
Share on Instapaper
Drupal Theme Development
Table of Contents
Theming
(Chapter 15)
The Core Themes Directory
Core Themes
Theme Engines
Theme Administration
Enabling and Setting a Default Theme
Administration Theme
Global Theme Settings
Installing a New Theme
Theme Metadata (.info Files)
Required Properties
Additional Properties
Exercise
Working with Regions
Default Regions
Hidden Regions
Module-Specific Regions
Regions and Your Theme
Using Regions vs. Hard-coding Variables in Template Files
Layout Strategies
Exercise
Template Files
Common Core Templates
Overriding Template Files
Global Template Variables
Theme Functions
How Theme Functions Are Created
Calling Theme Functions
Overriding Theme Functions
Exercise
Theme Hooks and Suggestions
What is a Theme Hook?
Theme Hook Suggestions
Suggestions and Template Files
Suggestions and Theme Functions
Summary
Advanced Theming
(Chapter 16)
Finding Available Variables in the Theme Layer
Using the Theme Developer Module
Preprocess and Process Functions
Implementing Preprocess and Process Hooks
Finding the Contents of $variables
Preprocess Functions in Action
Using the Render API
Identifying Render Elements
Manipulating the Output of Render Elements
Notable Render Arrays in Core Templates
Introducing render(), hide(), and show()
Theming Forms
How Form Markup is Generated
First Steps for Theming Forms
Theming Forms with Theme Functions
Theming Forms with Template Files
Modifying Forms Using Alter Hooks
Managing CSS Files
Aggregation and Compression
Patterns and Naming Conventions
Adding, Removing, and Replacing CSS Files
Exercise
Working with Base and Subthemes
Creating a Subtheme
Inheritance and How it Works
Finding a Good Base Theme
Tips for Creating Your Own Base Themes
Sustainability and Best Practices
Summary