Book Image

Drupal 5 Themes

Book Image

Drupal 5 Themes

Overview of this book

Drupal is an award winning open source Content Management System. Based on PHP/MySQL, its power and flexibility combined with its exceptional design mean it is already on the way to becoming the de facto standard for CMS Websites. Drupal?¢‚Ǩ‚Ñ¢s modular design and structured source code make it both highly flexible and easily extended and modified. Drupal is extremely scalable, making it ideal for both a simple personal website as well as an industrial strength commercial or institutional web presence.Drupal is a model open source project in that it has a large, friendly community of people who contribute to the project in various ways. Drupal is not only free and easy to use, but this community provides on going mutual support.
Table of Contents (14 chapters)
Drupal 5 Themes
Credits
About the Author
About the Reviewer
Preface
Appendix A

The Contents of the Drupal Distro


The default distribution of Drupal comes with a variety of themes ready for use. The themes provide a basic variety in look and style and also serve an important didactic purpose, that is, helping those new to Drupal understand how themes work. By studying the themes in the distro, you can learn from functional examples how various theming techniques can be implemented successfully.

To view the various themes, login as an administrator, then go to administer>themes. This is the theme administration page and on this page you will see a list of the themes installed and the controls that allow you to enable, activate, and configure each of the themes.

There are six themes in the default distro:

  • Bluemarine

  • Chameleon

  • Garland

  • Marvin

  • Minnelli

  • Pushbutton.

The templates provide some variety in layout, options, colors, and accessibility. Four of the themes employ the PHPTemplate engine; two do not. The default theme which is automatically selected during the installation process is Garland. You can switch to any of the other templates easily from within the administration interface.

To change templates, simply access administrator>themes in the admin interface and click the Enabled checkbox next to the theme you wish to activate. Select the radio button control marked Default if you wish to set the theme as the default. (The default theme will appear on all pages, which are not specifically assigned to another theme.) The new theme will automatically appear once your choice has been saved.

The admin screen showing the controls for enabling and configuring themes

All six templates contained in the distro can support either two or three column layouts, though in the default configuration you will see only two columns. The way in which these themes are designed creates the flexibility in the layout. The site administrator can assign items to a third column if desired; the third column will only appear when items are assigned to that position. When items are not assigned to the third column, the theme automatically collapses the unused region to show only two columns. The assignment of items to those columns is discussed in the next chapter.

The themes also vary in their approach to accessibility issues. Pushbutton and Bluemarine both employ tables in their layout. The other templates depend entirely upon CSS to place and control the elements on the page. (Table-based layouts are generally not preferred due to the barriers they erect to achieving accessible web pages.)

Note that two of the Themes, Minnelli and Marvin, are actually simple variations on other themes (specifically, Garland and Chameleon, respectively). The derivative

themes are built on the same frameworks as their parents (note the visual similarity in the accompanying illustration), but employ different style sheets and use CSS to impart a different layout and a slightly different look. The presence of a dedicated style.css file in a subdirectory tells PHPTemplate to treat this as a separate theme, distinct from its parent.