HTML templates and other PHP pages

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

The documentation pages below list the variables used in those template (.tpl.php files.) Your templates contain mostly HTML markup plus some light PHP code in order to place the content in the markup.

After you've perused the template files, the most important PHP file in your sub-theme is going to be the template.php file.

A quick overview of drupal theming

Helps make sense of all the HTML/PHP files

template.php

One of the most useful files when creating or modifying Drupal themes

block--no-wrapper.tpl.php

Returns the HTML for a block

block.tpl.php

Returns the HTML for a block

comment-wrapper.tpl.php

Returns the HTML for a wrapping container around comments

comment.tpl.php

Returns the HTML for comments

html.tpl.php

Returns the HTML for the basic html structure of a single Drupal page

maintenance-page.tpl.php

Returns the HTML for a single Drupal page while offline

node.tpl.php

Returns the HTML for a node

page.tpl.php

Returns the HTML for a single Drupal page

pane-header.tpl.php

Returns the HTML for Panels Everywhere's navigation pane

pane-messages.tpl.php

Returns the HTML for Panels Everywhere's messages pane

pane-navigation.tpl.php

Returns the HTML for Panels Everywhere's navigation pane

panelizer-view-mode.tpl.php

This file is only in Zen 7.x-3.x

panels-pane.tpl.php

Returns the HTML for a Panels pane

region--footer.tpl.php

Returns the HTML for the footer region

region--no-wrapper.tpl.php

Returns the HTML for region with bare minimum HTML

region--sidebar.tpl.php

This file is only in Zen 7.x-3.x

region.tpl.php

Returns HTML for a region

user-picture.tpl.php

Returns HTML for the user’s picture

Guide maintainers

JohnAlbin's picture