smartytemplate
smartytemplate.php: Your theme's powerhouse
Last modified: August 26, 2009 - 18:36
To step into more advanced aspects of the Drupal Theme system with a Smarty theme requires the creation of an additional file within your theme's directory.
(e.g. themes/blumarine_smarty/smartytemplate.php)
This file allows for
- Overriding Themable Functions see howto for phptemplate here: http://drupal.org/node/11811.
- Introduction of complex logic into your templates.
- Easily registering custom and existing functions for use within your templates.
- Defining additional variables for use within your templates.
An example for overriding an existing themable function follows:
(heavily borrowed from the phptemplate howto)
First, you need to locate the appropriate theme function to override. You can find a list of these in the API documentation. We will use theme_item_list() as an example.
If you want to override a theme function not included in the basic list (block, box, comment, node, page), you need to tell Smarty Theme Engine about it.
