With the large assortment of templates, stylesheets, and themable functions available to you in the default Drupal distribution, finding exactly what you need can sometimes be a bit of a challenge. In an effort to simplify the process of isolating relevant theming elements, we present in the pages that follow a list of the elements organized relative to the functionality they affect.
The theme.inc
file controls the Drupal theme system. In addition to initializing and loading the theme system, the file contains a number of themable functions that relate specifically to various key elements in Drupal. The functions can be found in two files: includes/theme.inc
and includes/theme.maintenance.inc
.
Here is a table of the themable functions and a description of each one:
Function |
Path |
Description |
---|---|---|
|
|
Handles the breadcrumb trail. |
|
|
Disables a list of themes. |
|
|
Enables a list of themes. |
|
|
Enables a feed icon. |
|
|
Gets the theme registry. |
|
|
Retrieves a setting for a theme. |
|
|
Generates an array of suggestions from path arguments. |
|
|
Returns HTML for a tag with attributes. |
|
|
Themes an image. |
|
|
Provides a div for standardizing indentation. |
|
|
Returns a themed list of items. |
|
|
Returns HTML for a link. |
|
|
Returns HTML for a list of links. |
|
|
Returns a themed marker for content (for example, new, updated). |
|
|
Produces the more help link. |
|
|
Produces the more link seen in blocks. |
|
|
Displays the percentage complete progress bar. |
|
|
Renders a system default template. |
|
|
Formats status and error messages. |
|
|
Formats a table. |
Function |
Path |
Description |
|
|
Produces the sort icon. |
|
|
Formats the username. |
The Aggregator module provides a variety of functions related to the aggregation and display of syndicated content feeds (for example, RSS, RDF, and Atom).
Theming the Aggregator module is made easier in Drupal 7 through the addition of several dedicated template files:
aggregator-feed-source.tpl.php
aggregator-item.tpl.php
aggregator-summary-item.tpl.php
aggregator-summary-items.tpl.php
aggregator-wrapper.tpl.php
The default templates are located at modules/aggregator/.
Provides a template for formatting the source of a feed. When a user is browsing the feed, they will see the output above the feed listings. The available variables include:
Formats an individual feed item. The available variables include:
Variable |
Description |
---|---|
|
Categories assigned to the feed. |
|
The content of the individual feed item. |
|
The title of the feed item from the source of the feed. |
|
The URL of the feed item from the source of the feed. |
|
The date of the item from the source of the feed. |
|
The title of the provider of the feed from the source of the feed. |
|
The URL to the source of the feed. |
Themes a linked feed item for summaries. The available variables include:
Variable |
Description |
---|---|
|
The age of the remote feed. |
|
The title of the feed item from the source of the feed. |
|
The URL of the feed item from the source of the feed. |
|
The title of the provider of the feed from the source of the feed. |
|
The URL to the source of the feed. |
Two stylesheets are dedicated to the formatting of the comments. Both are located at /modules/aggregator.
File |
Description |
---|---|
|
Affects the RSS/Newsfeed Aggregator Module and its contents. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
There are a number of themable functions that relate to the aggregator. The functions can be found in two files: modules/aggregator/aggregator.module
and modules/aggregator/aggregator.pages.inc
.
Function |
Path |
Description |
---|---|---|
|
|
Formats an individual feed item displayed in a block. |
|
|
Returns HTML for the aggregator page list form for assigning categories. |
|
|
Allows you to theme the output of the OPML feed. |
|
|
Allows you to theme the output of the RSS feed. |
The Block module provides the mechanism for managing the blocks on the page.
The system includes only two template files dedicated to blocks:
block.tpl.php
block-admin-display-form.tpl.php
The block.tpl.php
template can be found at modules/system/.
The block-admin-display-form.tpl.php
template can be found at modules/block/
.
This is the key template for formatting blocks. The available variables include:
Variable |
Description |
---|---|
|
The numeric ID associated with the module. |
|
A valid HTML ID. |
|
The module that generated the block. |
|
The region that contains the block. |
|
The block title. |
|
ID unique to the block in the region. |
|
Provides an "odd/even" marker for the block. Alternates for each block used within a region. |
|
String of classes that can be used to add contextual CSS styling. |
|
An array of HTML class attributes. This is a helper variable and is flattened into a string within the variable |
|
The block content. |
|
Similar to |
|
Returns True if user is an administrator. |
|
Returns True if user is viewing the front page. |
|
Returns True if user is logged in and authenticated. |
|
An array of additional output intended to be displayed in front of the main title tag. |
|
An array of additional output intended to be displayed after the main title tag. |
|
Provides an "odd/even" marker for block but is not region dependent. |
The Book module creates a node that allows for the creation of hierarchically organized groups of content items, united by a table of contents and common pagination. The book module provides the functions that impact book content and output.
The default system includes four default template files dedicated to the book functionality:
book-all-books-block.tpl.php
book-export-html.tpl.php
book-navigation.tpl.php
book-node-export-html.tpl.php
The templates can be found at modules/book/
.
The template renders book outlines within a block. The available variables include:
Variable |
Description |
---|---|
|
An array of the book outline. Presented as an unordered list. |
This template handles the printed version of the book outline. The available variables include:
Variable |
Description |
---|---|
|
The URL to the home page. |
|
The nodes within the book outline. |
|
The header tags. |
|
The code indicating the language used. |
|
Returns True when the site uses right-to-left text orientation. |
|
The node's title. |
Provides a template for formatting the navigation associated with a book node. The available variables include:
Variable |
Description |
---|---|
|
The ID of the current book being viewed. |
|
The title of the current book being viewed. |
|
The URL of the current book being viewed. |
|
The current node's depth inside the outline. |
|
Returns True whenever the parent, previous, or next function has a value. |
|
The title of the next node. |
|
The URL of the next node. |
|
The title of the parent node. |
|
The URL of the parent node. |
|
The title of the previous node. |
|
The URL of the previous node. |
|
The children of the current node, rendered as an unordered list. |
Provides a template for formatting a printer-friendly version of the node. The available variables include:
Variable |
Description |
---|---|
|
All the child nodes associated. |
Variable |
Description |
|
The content of the node. |
|
The current node's depth inside the outline. |
|
The title of the node. |
Two stylesheets are dedicated to the formatting of books. Both are located at /modules/book.
File |
Description |
---|---|
|
Controls the formatting of Book node content. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
There are only two themable functions that relate to books. The functions can be found in two locations: modules/book/book.module
and modules/book/book.admin.inc
.
Function |
Path |
Description |
---|---|---|
|
|
Themes the book administration page. |
|
|
Provides the HTML output for the link to the book title, when it is used as a block title. |
The Color module provides the color change functionality seen in the theme configuration manager of some themes.
The comment functionality allows users to add comments to published content.
Theming the comments is Drupal 7 is handled by two dedicated template files:
comment-wrapper.tpl.php
comment.tpl.php
The default templates are located at modules/comment/
.
This template is used to wrap all the comments. It is a container that controls the overall formatting of the comment area. The available variables include:
Variable |
Description |
---|---|
|
String of classes that can be used to provide contextual CSS styling. |
|
Array of HTML class attributes, flattened into a string within the variable |
|
Handles all the comments for a particular page. |
Variable |
Description |
|
The node object the comments are attached to. |
|
An array of additional output that is displayed in front of the main title tag. |
|
An array of additional output that is displayed after the main title tag. |
This is the primary template for controlling the appearance of a comment. The available variables include:
Variable |
Description |
---|---|
|
The name of the author of the comment. |
|
Date and time comment was last changed. |
|
String of classes that can be used to provide contextual CSS styling. |
|
The full comment object. |
|
The main body of the comment. |
|
Date and time comment was created. |
|
The date and time the comment was posted. |
|
The links associated with the functionality. |
|
A marker that indicates a new comment. |
|
The node object the comments are attached to. |
|
Comment's permalink. |
|
The author's picture. |
|
The author's signature. |
|
The status of the comment (that is, published, unpublished, and so on). |
|
Submitted by text with date and time. |
|
The title of the comment, linked to the comment body. |
|
An array of additional output that is displayed in front of the main title tag. |
|
An array of additional output that is displayed after the main title tag. |
Two stylesheets are dedicated to the formatting of the comments. Both are located at /modules/comment.
File |
Description |
---|---|
|
This is a very limited stylesheet which essentially only provides the indent style for comments. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
There are only two themable functions that relate to the comment functionality. The functions can be found at: modules/comment/comment.module
.
Function |
Path |
Description |
---|---|---|
|
|
Formats the list of recent comments displayed within a block. |
|
|
Controls the you can't post comments function. |
The Dashboard module handles the administration interface dashboard. As there is no frontend output from this module, the theming options are limited.
There is one stylesheet dedicated to the formatting of the dashboard. It is located at /modules/dashboard.
File |
Description |
---|---|
|
This stylesheet provides the styling of the dashboard. |
There are several themable functions associated with the Dashboard module. The functions can be found at: modules/filter/dashboard.module
.
Function |
Path |
Description |
---|---|---|
|
|
Returns the HTML for the entire dashboard |
|
|
The HTML for the non-customizable portion of the dashboard. |
|
|
Styling for the generic dashboard region. |
|
|
Styling for a set of disabled blocks. |
|
|
Styling for a disabled block. |
The DBLog records system events and allows administrators to monitor their system. There is no frontend functionality associated with this module, hence the theming options are limited.
The Field module powers the custom field creation.
There is one dedicated template file:
* field.tpl.php
The default template is located at modules/field/theme
.
This template is not actually used in the system, but is simply provided as a starting point for customization. If needed, copy and place in the active theme directory. The available variables include:
Variable |
Description |
---|---|
|
String of classes that can be used to provide contextual CSS styling. |
|
Array of HTML class attributes, flattened into a string within the variable |
|
The field language. |
|
The field name. |
|
Whether the field is translatable. |
|
The field type. |
|
The position of the label display. |
Variable |
Description |
|
View mode full or teaser. |
|
CSS compatible field name. |
|
CSS compatible field type. |
|
An array of field values. |
|
The item label. |
|
Whether the label is set to hidden. |
Two stylesheets are dedicated to the formatting of the field. Both are located at /modules/field/theme.
File |
Description |
---|---|
|
A limited set of styles for the fields and the field form. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
There are several themable functions associated with the Field module. The functions can be found in three files: modules/field/field.module, modules/field/field.form.inc
, and modules/field/modules/options/options.module
.
Function |
Path |
Description |
---|---|---|
|
|
The HTML for a field. |
|
|
HTML for an individual form element. |
|
|
The HTML for the label for values not required. |
The Field UI module gives an interface for managing custom fields. As there is no frontend output from this module, the theming options are limited.
The File module provides the file field.
There is one stylesheet for the File module, located at /modules/file.
File |
Description |
---|---|
|
Basic styling for the file element. |
There are several themable functions associated with the File module. The functions can be found at: modules/file/file.field.inc
.
Function |
Path |
Description |
---|---|---|
|
|
Styling for the file attachments table. |
|
|
HTML for the icon associated with the file type. |
|
|
HTML for a link to the file. |
|
|
Styling for a managed file element. |
|
|
Styling for the help text for the file uploader. |
|
|
HTML for an individual file upload widget. |
|
|
HTML for a group of file upload widgets. |
The Filter module allows administrators to specify the text input formats for the site and filter out things that are potentially malicious or harmful. As there is no frontend output from this module, the theming options are limited.
There is one stylesheet for the Filter module, located at /modules/filter.
File |
Description |
---|---|
|
Basic styling for the filter functionality. |
There are several themable functions associated with the Filter module. The functions can be found in three files: modules/filter/filter.module, modules/filter/filter.admin.inc
, and modules/filter/filter.pages.inc.
Function |
Path |
Description |
---|---|---|
|
|
HTML for a text format's filter order form. |
|
|
Themes the admin overview form for filters. |
|
|
HTML for guidelines for a text format. |
|
|
Formats the filter tips. |
|
|
Formats the filter tips more info link. |
|
|
HTML for a text format enabled form element. |
Handles the various forms and their elements.
There exists a large number of themable functions associated with forms. The functions can be found at: includes/form.inc
.
Function |
Path |
Description |
---|---|---|
|
|
Formats a button. |
|
|
Formats an individual checkbox. |
|
|
Handles a set of checkboxes. |
Function |
Path |
Description |
|
|
The HTML to wrap the child elements in a container. |
|
|
Formats the date selection element. |
|
|
Formats a group of form items. |
|
|
Formats a file upload field. |
|
|
Provides an anonymous |
|
|
Returns a themed form element, including the this field is required message. |
|
|
HTML for a form element label. |
|
|
The HTML for the "required" marker. |
|
|
Formats a hidden form field. |
|
|
Handles formatting of a form image button. |
|
|
Styling for a menu link and submenu. |
|
|
Formats a single local action link. |
|
|
Formats a single local task link. |
|
|
Formats the primary and secondary local tasks. |
|
|
The HTML for a wrapper for a menu sub-tree. |
|
|
Formats a password field. |
|
|
Formats a radio button. |
|
|
Formats a set of radio buttons. |
|
|
Formats a drop-down menu or scrolling selection box. |
|
|
Formatting of the submit button on a form. |
Function |
Path |
Description |
|
|
HTML for a table with select controls (that is, radio buttons or checkboxes). |
|
|
Formats a text area within a form. |
|
|
Formats a text field within a form. |
|
|
Formats an element's children as vertical tabs |
Note
Forms are discussed in greater length in Chapter 8,
The Forum module handles the threaded discussion forums in Drupal. As this is a fairly complex module with a significant role on the frontend of the system, it is not surprising that there are a number of options available for theming this functionality.
The default system includes five default template files dedicated to the forum functionality:
forum-icon.tpl.php
forum-list.tpl.php
forum-submitted.tpl.php
forum-topic-list.tpl.php
forums.tpl.php
The templates can be found at modules/forum/.
Displays the icon associated with a post (for example, new, sticky, closed, and so on). The available variables include:
Variable |
Description |
---|---|
|
Indicator showing that the item is the first topic with new posts. |
|
The icon to be displayed. |
|
Indicates whether the topic includes any new posts. |
Template to control the display of the list of forums and containers. The available variables include:
Variable |
Description |
---|---|
|
The ID of the current forum. |
|
Depth of forum within content hierarchy. |
|
Forum's description |
|
TRUE if the forum containers other forums. |
|
Last time a forum was posted or commented on. |
|
URL of the forum. |
|
Forum's name. |
|
TRUE if the forum contains unread posts. |
|
Tells how many new posts. |
|
URL to unread posts. |
|
Total number of posts in forum. |
|
Count of posts already read. |
|
Even or odd string used for row classes. |
|
An array of forums and containers. |
This template controls the submitted by… information. The available variables include:
Variable |
Description |
---|---|
|
The name of the author of the post. |
|
When the post was made. |
|
The raw post data. |
This template displays a list of the forum topics. The available variables include:
Variable |
Description |
---|---|
|
The table header. |
|
The pagination elements. |
|
Numerical ID for current topic. |
|
An array of the topics. |
|
The number of replies to the topic. |
|
When the topic was posted. |
|
The icon. |
|
When the topic was last replied to. |
|
The explanation and link for when a topic has been moved. |
|
Flag to indicate a moved topic. |
|
Flag to indicate unread comments. |
|
Text containing the count. |
|
URL to any unread replies. |
|
Raw timestamp for when topic was posted. |
|
The title of the topic. |
|
Even or odd string used for row classes. |
The Help module powers the context-sensitive help information, most often seen in the admin interface.
The Image module assists with the image field and image management.
There are three stylesheets dedicated to the image module. They are located at /modules/image.
File |
Description |
---|---|
|
Provides selectors for preview and the widget. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
|
Selectors for the admin view. |
There are multiple themable functions related to the image functionality. They can be found in three separate files:
Function |
Path |
Description |
---|---|---|
|
|
Formats the 3x3 grid of checkboxes for image anchors. |
|
|
HTML for summary of image crop effect. |
|
|
HTML for the image field formatter. |
|
|
HTML for summary of image resize effect. |
|
|
HTML for summary of image rotate effect. |
|
|
HTML for summary of image scale effect. |
|
|
Formats an image using a specific style. |
|
|
HTML for the listing of the effects in a specific image style. |
Function |
Path |
Description |
|
|
Formats the page containing the list of image styles. |
|
|
HTML for the preview of an image style. |
|
|
Formats the image field widget. |
The Locale module enables administrators to manage a site's interface languages.
There is only one stylesheet dedicated to the Locale module. It is located at /modules/locale.
File |
Description |
---|---|
|
Provides a selector for the Locale module. |
There are three themable functions related to the locale functionality:
Function |
Path |
Description |
---|---|---|
|
|
Formats the local date format form. |
|
|
HTML for a language configuration page. |
|
|
Themes the locale admin manager form. |
The Menu module allows administrators to customize the site navigation menu.
There is only one stylesheet dedicated to the Menu module. It is located at /modules/menu
.
File |
Description |
---|---|
|
Provides three selectors for the menu module. |
There are only two themable functions that relate to the Menu module.
Function |
Path |
Description |
---|---|---|
|
|
HTML for the menu title and description for the menu overview page. |
|
|
Themes the menu overview form. |
The Node module allows content to be submitted to the site, in various forms.
The Node module provides a single dedicated template file, but it is key. This one template provides many formatting options and handles all node content:
modules/node/node.tpl.php
This template controls node display. This is a powerful and important template and accordingly there are a number of variables associated with it:
Variable |
Description |
---|---|
|
String of classes that can be used to provide contextual CSS styling. |
|
Array of HTML class attributes; flattened into a string within the variable |
Variable |
Description |
|
The comment settings for the node. |
|
The number of comments tied to the node. |
|
The node body and/or teaser. |
|
The time the node was published. |
|
The creation date of the node. |
|
Whether submission information should be displayed. |
|
The position of the node. |
|
Returns True when the current user is an administrator. |
|
Returns True when the current page is the front page. |
|
Returns True when the current user is logged in and authenticated. |
|
The username of the node's author. |
|
The full node object. |
|
The URL of the current node. |
|
Flag indicating full page state. |
|
Flag indicating from page promotion state. |
|
Flag indicating length of node exceeds teaser limit. |
|
Flag indicating published state. |
|
Flag indicating sticky state. |
|
The submitted by… information. |
|
Flag indicating the teaser state. |
|
The node's title. |
|
An array of additional output that is displayed before the main title tag. |
|
An array of additional output that is displayed after the main title tag. |
|
The node type (for example, story, blog, and so on). |
|
The user ID of the node's author. |
|
The picture of the node's author. |
|
The view of the node (that is, teaser, full). |
|
Even or odd string used for row classes. |
Two stylesheets are dedicated to the node module. Both are located at: /modules/node.
File |
Description |
---|---|
|
Provides selectors for nodes. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
There are a number of themable functions that relate to the node functionality. The functions can be found in three files: modules/node/node.module, modules/node/node.admin.inc
, and modules/node/node.pages.inc.
Function |
Path |
Description |
---|---|---|
|
|
Displays the list of available node types. |
|
|
Formats the node administration overview. |
|
|
The node preview used during content creation and editing. |
|
|
Formats a list of recent content. |
|
|
Formats the recent node displayed in the recent content block. |
|
|
Renders the admin node search form. |
The OpenID module enables authentication with the OpenID protocol.
Controls the formatting and display of the Poll module, including the voting forms and the results.
There are five dedicated templates for the poll functionality, covering block and page output:
poll-bar--block.tpl.php
poll-bar.tpl.php
poll-results--block.tpl.php
poll-results.tpl.php
poll-vote.tpl.php
The default templates are located at modules/poll/
.
Provides a template for formatting the results bar of a single poll answer choice, applicable when poll is in block position. The available variables include:
Variable |
Description |
---|---|
|
The percentage of total votes received by this answer choice. |
|
The title of the poll. |
|
The number of votes cast for this answer choice. |
|
The current user's vote on the poll. |
|
Returns True if the user had voted on this poll. |
|
The total number of votes cast in the poll. |
Displays the bar for a single choice in the poll. The available variables are the same as those for the template poll-bar-block.tpl.php
, above.
Provides a template for the display of poll results. The available variables include:
Variable |
Description |
---|---|
|
The form for a user to cancel their vote. |
|
Links in the poll. |
|
The NID of the poll. |
|
Raw array of links in the poll. |
|
The results of the poll. |
|
The title of the poll. |
|
The current user's vote on the poll. |
|
The total number of votes cast in the poll. |
Provides a template for the display of poll results, applicable in block position. The available variables are the same as those for poll-results.tpl.php
.
Provides a template for the voting form for a poll. The available variables include:
Variable |
Description |
---|---|
|
Returns True if this is being displayed in a block. |
|
The radio buttons for voting on the choices in the poll. |
|
A catch-all to pick up anything else that may have been added via hooks. |
|
The title of the poll. |
|
The vote button. |
The Profile module deals with the user profile pages.
Drupal 7 provides three dedicated template files to assist with formatting the profile functionality:
profile-block.tpl.php
profile-listing.tpl.php
profile-wrapper.tpl.php
The default templates are located at modules/profile/.
Handles the display of a user's profile within a block. The available variables include:
Variable |
Description |
---|---|
|
The title of the profile field. |
|
The type of the profile field. |
|
The value of the profile field. |
|
Array of all profile fields that have data. |
|
The image associated with the user. |
Provides a template for the user information on the member listing page. The available variables include:
Variable |
Description |
---|---|
|
User's account object. |
|
The title of the profile field. |
|
The type of the profile field. |
|
The value of the profile field. |
|
The name of the user. |
Variable |
Description |
|
The image associated with the user. |
|
Array of all profile fields that have data. |
The Search module powers the various search options for Drupal.
There are three default templates for theming the search forms:
search-block-form.tpl.php
search-result.tpl.php
search-results.tpl.php
The default templates are located at modules/search/
.
Provides a template for displaying a search form within a block. The available variables include:
Variable |
Description |
---|---|
|
The complete search form. |
|
An array of search form elements. |
|
Handles hidden form elements. |
|
Formats the text input area. |
|
Handles the form submit button. |
This template renders a single search result. The available variables include:
Variable |
Description |
---|---|
|
Array of HTML class attributes, flattened into a string within the variable |
|
An array of HTML attributes for the content. |
|
String of all the meta information. |
|
Contains the same data as |
|
Number of comments. |
|
Last update of the node. |
|
The node type. |
|
Number of attachments. |
|
Author of the node. |
|
The machine-readable name of the module being searched. |
|
The title of the result. |
|
Array of HTML attributes for the title. |
|
An array of additional output that is displayed in front of the main title tag. |
|
An array of additional output that is displayed after the main title tag. |
Variable |
Description |
|
The type of search. |
|
The URL of the result. |
The Shortcut module handles the shortcuts functionality associated with the toolbar area of the admin system.
File |
Description |
---|---|
|
Two basic selectors affecting shortcut display. |
|
The primary stylesheet for formatting the shortcuts. |
The System module plays an important role in Drupal. The module provides important functionality for generating pages as well as handling the various configuration controls that help administrators modify the workings of the site.
The System module contains some of the most important templates in Drupal. The page and box templates are two key files for theming your site.
html.tpl.php
maintenance-page.tpl.php
page.tpl.php
region.tpl.php
The default templates are located at: modules/system/.
Provides a template for providing essential information included in all themes, for example, the namespace.
Variable |
Description |
---|---|
|
Classes used to provide contextual CSS styling. |
|
An array of the CSS files for the current page. |
Variable |
Description |
|
A GRDDL profile to be used for extracting RDF data. |
|
The markup for the |
|
The page title, for use in the TITLE tag. |
|
Contains the parts used to generate the |
|
The language the site is displayed in. |
|
The rendered page content. |
|
Closing markup from any modules that have altered the page. |
|
Markup from modules that have altered the page. |
|
The RDF namespace prefixes. |
|
Loads the JavaScript files. |
|
To import all the CSS files for the page. |
Provides a template for formatting the "site under maintenance" page. The available variables are the same as those applicable to the html.tpl.php
and the page.tpl.php
files.
Provides an important template for controlling the output on a Drupal page. The available variables include:
Variable |
Description |
---|---|
|
An array of actions local to the page. |
|
The base path of the Drupal installation. |
|
The breadcrumb trail for the current page. |
|
The directory where the theme is located. |
|
A string of the feed icons relevant to the page. |
|
The URL of the front page. |
|
Returns True is user is an administrator. |
|
Returns True if current page is the front page. |
|
Returns True if user is logged in and authenticated. |
|
The path to the logo image. |
|
An array of the main menu links. |
|
The status and error messages. |
Variable |
Description |
|
The node object. |
|
A region, in this case, the main content area. |
|
A region, in this case, the footer region. |
|
A region, in this case, the header region. |
|
A region, in this case, the region that displays the help messages. |
|
A region, in this case, the highlighted content region. |
|
A region, in this case, the first sidebar. |
|
A region, in this case, the second sidebar. |
|
An array containing the secondary menu links. |
|
The name of the site, as defined in the admin system. |
|
The site slogan, as defined in the admin system. |
|
The tabs linking to sub-pages (for example, edit). |
|
The page title. |
|
An array of additional output that is displayed in front of the main title tag. |
|
An array of additional output that is displayed after the main title tag. |
Provides a template for creating a box around items. The available variables include:
Variable |
Description |
---|---|
|
Classes used to provide contextual CSS styling. |
|
Array of HTML class attributes, flattened into a string within the variable |
|
The content for the region (typically blocks). |
|
Returns True when the current user is the admin user. |
|
Returns True when the current page is the front page. |
|
Returns True when the current user is logged in and authenticated. |
|
The name of the region variable. |
There are a large number of stylesheets associated with the System module, however, the primary styling of the key templates discussed above is typically managed from within the styles.css
file located in the theme
directory. The following stylesheets are located at: modules/system
.
File |
Description |
---|---|
|
Contains the styles for the administration pages. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
|
The Drupal system's theme agnostic styles. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
|
The styles for the maintenance page. |
|
Covers a wide variety of common styles, and also includes menus, tabs, and progress bars. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
|
Styling for the system messages. |
|
Basic styling for common markup. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
There are a number of themable functions that relate to the System module. The functions can be found in two files: modules/system/system.module
and modules/system/system.admin.inc
.
Function |
Path |
Description |
---|---|---|
|
|
Handles the admin system block display. |
|
|
Formats the contents of the admin block. |
|
|
Formats the administration page. |
|
|
Formats the confirmation form. |
Function |
Path |
Description |
|
|
HTML for the exposed filters form. |
|
|
Themes the admin system's status report page. |
|
|
Formats the output of the admin dashboard page. |
|
|
Formats the link to show or hide the help descriptions. |
|
|
Formats the date setting form. |
|
|
HTML for the modules form. |
|
|
The HTML for the message warning of incompatible modules. |
|
|
Formats the table containing the uninstalled modules. |
|
|
Format the Powered by Drupal text. |
|
|
The HTML for the system settings form. |
|
|
HTML for the Theme Manager page. |
The Taxonomy module enables the organization of content into categories, according to a hierarchical vocabulary.
The Taxonomy module contains only one dedicated template.
taxonomy-term.tpl.php
Provides a template for creating a box around items. The available variables include:
Variable |
Description |
---|---|
|
Classes used to provide contextual CSS styling. |
|
Array of HTML class attributes, flattened into a string within the variable |
|
An array of the content of the term. |
|
Position of a term. |
|
Returns True when the current user is the admin user. |
|
Returns True when the current page is the front page. |
|
Returns True when the current user is logged in and authenticated. |
|
The name of the term. |
|
Flag indicating full page state. |
|
The full term object. |
|
The URL of the term. |
|
The view mode (teaser, full, and so on). |
|
Provides an "odd/even" marker useful for styling. |
The Toolbar module provides the admin system's toolbar functionality.
The Tracker module enables the tracking of recent posts from users.
The Update module checks for available updates to the Drupal core and modules and notifies the administrator if any are available.
Two stylesheets are dedicated to the formatting of the update functionality. Both are located at /modules/update.
File |
Description |
---|---|
|
Numerous selectors for the update module interface in the admin system. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
There are two themable functions associated with the update functionality. The functions can be found at: modules/update/update.report.inc, modules/update/update.module
, and at modules/update/update.manager.inc
.
Function |
Path |
Description |
---|---|---|
|
|
The HTML for the last time the system checked for updates. |
|
|
Formats the first page in the update manager wizard (select projects). |
|
|
Formats the project status report. |
|
|
Formats the label to display the update status. |
|
|
Formats the version display. |
Enables the user registration and login system.
Theming the user pages is made easier in Drupal 7 through the addition of four dedicated template files:
user-picture.tpl.php
user-profile-category.tpl.php
user-profile-item.tpl.php
user-profile.tpl.php
The default templates are located at: modules/user/.
Handles the presentation of the image associated with the user's account. The available variables include:
Variable |
Description |
---|---|
|
An array of the account information. |
|
The image set by the user for the account. |
Provides a template for formatting the presentation of user profiles in category view. The available variables include:
Variable |
Description |
---|---|
|
The HTML attributes. |
|
All the items for the group. |
|
The category title for the group. |
Two stylesheets are dedicated to the formatting of the user data. Both are located at /modules/user.
File |
Description |
---|---|
|
Styles for the User module and Profile module, includes styles for user administration. |
|
A stylesheet that is used when the site employs right-to-left text orientation. |
There are a number of themable functions that relate to the user functionality. The functions can be found in two files: modules/user/user.module
and modules/user/user.admin.inc
.
Function |
Path |
Description |
---|---|---|
|
|
Themes the permissions manager. |
|
|
Handles the new role form. |
|
|
Produces a list of users. |
|
|
Formats individual permission description. |
|
|
Handles the output of the user's signature. |