Themeable functions

Functions that display HTML, and which can be customized by themes.

All functions that produce HTML for display should be themeable. This means that they should be named with the theme_ prefix, and invoked using theme() rather than being called directly. This allows themes to override the display of any Drupal object.

The theme system is described and defined in theme.inc.

Functions

NameLocationDescription
phptemplate_menu_local_tasksthemes/garland/template.phpReturns the rendered local tasks. The default implementation renders them as tabs.
theme_aggregator_block_itemmodules/aggregator/aggregator.moduleFormat an individual feed item for display in the block.
theme_aggregator_feedmodules/aggregator/aggregator.moduleFormat a news feed.
theme_aggregator_page_itemmodules/aggregator/aggregator.moduleFormat an individual feed item for display on the aggregator page.
theme_aggregator_summary_itemmodules/aggregator/aggregator.moduleReturn a themed item heading for summary pages located at "aggregator/sources" and "aggregator/categories".
theme_blockincludes/theme.incReturn a themed block.
theme_blocksincludes/theme.incReturn a set of blocks available for the current user.
theme_book_export_htmlmodules/book/book.moduleHow the book's HTML export should be themed
theme_book_navigationmodules/book/book.modulePrepares the links to children (TOC) and forward/backward navigation for a node presented as a book page.
theme_boxincludes/theme.incReturn a themed box.
theme_breadcrumbincludes/theme.incReturn a themed breadcrumb trail.
theme_closureincludes/theme.incExecute hook_footer() which is run at the end of the page right before the close of the body tag.
theme_comment_blockmodules/comment/comment.moduleReturns a formatted list of recent comments to be displayed in the comment block.
theme_feed_iconincludes/theme.incReturn code that emits an feed icon.
theme_filter_tipsmodules/filter/filter.moduleFormat a set of filter tips.
theme_forum_displaymodules/forum/forum.moduleFormat the forum body.
theme_forum_iconmodules/forum/forum.moduleFormat the icon for each individual topic.
theme_forum_listmodules/forum/forum.moduleFormat the forum listing.
theme_forum_topic_listmodules/forum/forum.moduleFormat the topic listing.
theme_forum_topic_navigationmodules/forum/forum.moduleFormat the next/previous forum topic navigation links.
theme_helpincludes/theme.incReturn a themed help message.
theme_imageincludes/theme.incReturn a themed image.
theme_item_listincludes/theme.incReturn a themed list of items.
theme_linksincludes/theme.incReturn a themed set of links.
theme_markincludes/theme.incReturn a themed marker, useful for marking new or updated content.
theme_menu_itemincludes/menu.incGenerate the HTML output for a single menu item.
theme_menu_item_linkincludes/menu.incGenerate the HTML representing a given menu item ID.
theme_menu_linksincludes/menu.incReturns the themed HTML for primary and secondary links. Note that this function is overridden by most core themes because those themes display links in "link | link" format, not from a list. Also note that by default links rendered with...
theme_menu_local_taskincludes/menu.incGenerate the HTML representing a given menu item ID as a tab.
theme_menu_local_tasksincludes/menu.incReturns the rendered local tasks. The default implementation renders them as tabs.
theme_menu_treeincludes/menu.incGenerate the HTML for a menu tree.
theme_more_help_linkincludes/theme.incReturns code that emits the 'more help'-link.
theme_nodeincludes/theme.incReturn a themed node.
theme_pageincludes/theme.incReturn an entire Drupal page displaying the supplied content.
theme_pagerincludes/pager.incFormat a query pager.
theme_pager_firstincludes/pager.incFormat a "first page" link.
theme_pager_lastincludes/pager.incFormat a "last page" link.
theme_pager_listincludes/pager.incFormat a list of nearby pages with additional query results.
theme_pager_nextincludes/pager.incFormat a "next page" link.
theme_pager_previousincludes/pager.incFormat a "previous page" link.
theme_placeholderincludes/theme.incFormats text for emphasized display in a placeholder inside a sentence. Used automatically by t().
theme_search_itemmodules/search/search.moduleFormat a single result entry of a search query. This function is normally called by theme_search_page() or hook_search_page().
theme_search_pagemodules/search/search.moduleFormat the result page of a search query.
theme_status_messagesincludes/theme.incReturn a themed set of status and/or error messages. The messages are grouped by type.
theme_submenuincludes/theme.incReturn a themed submenu, typically displayed under the tabs.
theme_tableincludes/theme.incReturn a themed table.
theme_tablesort_indicatorincludes/theme.incReturn a themed sort icon.
theme_table_select_header_cellincludes/theme.incReturns a header cell for tables that have a select all functionality.
theme_usernameincludes/theme.incFormat a username.
theme_user_listmodules/user/user.moduleMake a list of users.
theme_user_profilemodules/user/user.moduleTheme a user page
theme_xml_iconincludes/theme.incReturn code that emits an XML icon.
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.