Using the theme layer (Drupal 6.x)

See also: Theme handbook (D6)

Modules in Drupal have the capability to allow presentation to be overridden for use on individual sites; this capability is called theming. In order for the theme layer to be usable, a module must be written to take advantage of it. To do this, logic must be separated as much as possible from presentation.

To accomplish this, modules do as much of the work on the data as possible, and hand that data off to the presentation layer. Modules then provide default implementations that provide the basic presentation and serve as a basis for themes that wish to provide an alternate presentation. This is handled through the theme() function. Every chunk of output that is themed through the theme() function is called a theme hook. There are two ways to provide a default implementation. The easier but less recommended way is to provide a function, and the recommended way is to provide a template and a corresponding preprocessor function. We'll expand on this in a little bit.

Customizing the search forms

This info applies to Drupal 6 and 7.

Description

This guide describes how to override the default SEARCH THEME FORM* layout when using phptemplate based themes and the core Search module.

* The SEARCH THEME FORM is the search box that that appears in the page header, when enabled. Refer to the NOTES below for overriding the block search form and main page search form.

Pages

Subscribe with RSS Subscribe to RSS - theming