
1. Adding and manipulating template variables and the Drupal call order:
template_preprocess()
template_preprocess_breadcrumb()
MODULENAME_preprocess() // Defined in module
MODULENAME_preprocess_breadcrumb() // Defined in module
phptemplate_preprocess()
phptemplate_preprocess_breadcrumb()
THEMENAME_preprocess()
THEMENAME_preprocess_breadcrumb()
2. Overriding with Theme Functions and the Drupal call order:
THEMENAME_breadcrumb()
phptemplate_breadcrumb()
sites/all/themes/THEMENAME/breadcrumb.tpl.php
theme_breadcrumb()
3. Devel module and Theme development module is helpful to show you message about theme override.
4. When you theme a CCK filed by adding a file content-filed-field_xxx.tpl.php, do not forget to place an original content-field.tpl.php in the same folder.
5. Do not forget to clear cache if no changes show.
How to use Drupal theme variables?
Add the following codes into themplt.php
<?php
yourthemename_preprocess_page(&$variables) {
$variables['happyday'] = 'Happy ' . format_date(time(), 'custom', 'l') . '!';
}
?>
And display the variables in page.tpl.php:
<?php
print $happyday;
?>