PacktLib: Drupal 7 Themes

Drupal 7 Themes


About the Author

About the Reviewer


Learning the Basics of Drupal Theming

The importance of themes in Drupal

What is a theme?

What is a theme engine?

The range and flexibility of Drupal themes

The output of a Drupal theme

The site administrator's view

The default Drupal themes

Theme files


Working with the Default Configuration and Display Options

Configuring a theme

Controlling module and block visibility

Finding additional themes

Installing an additional theme

Uninstalling themes


Understanding PHPTemplate Themes

What is PHPTemplate?

How does it all work?

Key PHPTemplate theme files


Using Intercepts and Overrides

Putting together the pieces

Overriding the default CSS

Overriding templates and themable functions

Working with template variables


Customizing an Existing Theme

Setting up the workspace

Planning the modifications

Selecting a base theme

Creating a new sub-theme

Customizing the sub-theme


Creating a New Theme

Planning the build

Creating a new theme through sub-theming

Building a new theme without sub-theming


Dynamic Theming

Designating a separate Admin theme

Using multiple page templates

Dynamically theming page elements

Creating dynamic CSS styling


Dealing with Forms

The Default Forms

How Forms work in Drupal

Modifying forms


Overcoming Common Challenges in Drupal Theming

Maintaining cross-browser compatibility

Creating accessible themes

Creating template suggestions for fields

Creating template suggestions for specific nodes

Suggestions for key modules

Theming Views

Theming Panels

Theming the maintenance page

Troubleshooting your theme


Useful Extensions for Themers

Drupal modules

Third-party software


Identifying Templates, Stylesheets, and Themable Functions

Identifying Templates, Stylesheets, and Themable Functions