Integrating with the theme system

Drupal: 28m
Video Series
Information

This video shows how a module can integrate with Drupal's theme system by exposing a new themeable item to the theme registry with hook_theme(), and then creates a function in order the customize the output of that themeable item. The then video demonstrates how the theme layer can override the markup defined with theme functions at the module layer.

Discussion

Comments on this video

Comments here have been temporarily disabled. Please drop a line with our support for any questions or comments about the videos, blog posts, or about the site generally.

um, went ahead and I cleared the cache - and realised my website had picked up on the HTML from the TPL file without the need for the spy_glass_preprocess_spy_glass_item described in 22:00. how come?

also, if I wanted to build two TPLs - one for the page that builds an item list and another for the actual items - how would I go about doing that?

Lullabot logo

Lullabot has trained thousands of Drupal developers & guided the development of some of the largest Drupal websites.