The theme includes a template. php file which, as we have seen in previous examples, contains various overrides to themeable functions. The author of the theme has also gone further and written files to intercept and override the key template files, block. tpl. php, box. tpl. php, comment. tpl. php, and node . tpl. php. Each of those files will override its respective counterpart in the PHPTemplate engines directory. The author has also added the file node - forum .tpl. php, which is designed to provide overrides specific to the forum functionality.
Note that all the overrides are shared, and are placed in the root of the theme rather than in the sub-theme directory.
• biock. tpi . php: This template styles the block presentation.
• box. tpi . php: This template provides a container for wrapping the contents.
• comment. tpi . php: This template formats comments to posts and to the forum.
• node. tpi . php: This template formats the nodes.
• node - forum .tpi. php: This template formats the forum. -[126 ]-
The template. php file contains only one override—the breadcrumb function, which controls the formatting of the breadcrumb trail. The various alternative . tpl files provide a narrow range of customizations, largely focusing on inserting additional divs and classes that the theme's author uses to give more control over the formatting of various items.
Drupal follows rules of precedence in regards to template files, just as it does in other areas (e.g., themeable functions, CSS, etc.). For example, the following list of files goes from most specific to least specific—the files in the upper part of the this list have precedence over the ones below them in the list:
page-node-edit.tpl.php page-node-1.tpl.php page-node.tpl.php page.tpl.php
Was this article helpful?