Use of template.php
The template.php file contains your sub-theme's functions to manipulate Drupal's default markup. It is one of the most useful files when creating or modifying Drupal themes. With this file you can do three things:
- Modify any theme hooks variables or add your own variables, using preprocess or process functions.
- Override any theme function. That is, replace a module's default theme function with one you write.
- Call
hook_*_alter()functions which allow you to alter various parts of Drupal's internals, including the render elements in forms. The most useful of which includehook_form_alter(),hook_form_FORM_ID_alter(), andhook_page_alter(). See api.drupal.org for more information about _alter functions.
Comments
Post a Comment