Show Menu

Drupal 6 Theme Variables Cheat Sheet by emmajane

Drupal Version 6 Theme Variables for common (and core) tpl.php template files.

page.t­pl.php

$logo The path to the logo image, as defined in theme config­ura­tion.
$sit­e_n­ame The name of the site, empty when display has been disabled in theme settings.
$sit­e_s­logan The slogan of the site, empty when display has been disabled in theme settings.
$mis­sion The text of the site mission, empty when display has been disabled in theme settings.
$sea­rch­_box HTML to display the search box, empty if search has been disabled.
$pri­mar­y_l­inks An array containing primary navigation links for the site, if they have been config­ured.
$sec­ond­ary­_li­nks An array containing secondary navigation links for the site, if they have been config­ured.
$left The HTML for the left sidebar.
$bre­adc­rumb The breadcrumb trail for the current page.
$title The page title, for use in the actual HTML content.
$help Dynamic help text, mostly for admin pages.
$mes­sages HTML for status and error messages. Should be displayed promin­ently.
$tabs Tabs linking to any sub-pages beneath the current page (e.g., the view and edit tabs when displaying a node).
$con­tent The main content of the current Drupal page.
$right The HTML for the right sidebar.
$node The node template file.
$fee­d_i­cons A string of all feed icons for the current page.
$foo­ter­_me­ssage The footer message as defined in the admin settings.
$foo­ter The footer region.
Version 6
 

node.t­pl.php

$title the (sanit­ized) title of the node.
$con­tent Displays either a list of node teasers (e.g. default front page) or the full content of one node. When combined with other contri­buted modules this variable may also printing out other “stuff” like a calendar or a list of catego­ries.
$pic­ture The authors picture of the node.
$date Formatted creation date.
$links Themed links like "Read more", "Add new commen­t", etc.
$name Themed username of node author.
$nod­e_url Direct url of the current node
$terms the themed list of taxonomy term links.
$sub­mit­ted themed submission
inform­ation.
$com­men­t_c­ount Number of comments attached to the node.
$cre­ated Time the node was published formatted in Unix timestamp.
Version 6

block.t­pl.php

$blo­ck-­>su­bject Block title
$blo­ck-­>co­ntent Block content
Version 6
 
 

Share This Cheat Sheet!

Comments

Richard Richard, 07:47 10 Feb 12

I've been looking for something like this for a while. Many, many thanks!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.