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 include hook_form_alter()hook_form_FORM_ID_alter(), and hook_page_alter(). See api.drupal.org for more information about _alter functions.

Comments

Popular posts from this blog

Difference between hook_boot and hook_init Drupal

Difference between DBMS and RDBMS?

Update node in Drupal 7