October 21 to 23, 2011

UC Berkeley, California

A culmination of the brightest Drupal minds in the technology hub of the world


Top Ten Tpl.php Theming Tips

Tpl.php are the files, used by phptemplate in Drupal, to present information to the screen. That sounds complex; however, this will be an entry level discussion about theming the content inside a node. We will focus on the ground level of what a node template is, how to understand what is in the template file, how to adjust what is in the template file, and how it fits into the page (page template). Discussion will revolve around Drupal 7, and most will be applicable to Drupal 6. The goal is to provide the beginner with enough detail and information that editing the tpl.php files is a cleaner, clearer, faster, and safer choice to relying on contributed modules.

Specifically covering:

  • what is page.tpl.php
  • what is node.tpl.php
  • what is template.php
  • basic editing of page.tpl.php
  • basic editing of node.tpl.php
  • tpl.php and cck fields
  • basic preprocessing (template.php)
  • 10 tips when working in tpl.php files