- drupal
Functions and templates for the user interface to be implemented by themes.
Drupal's presentation layer is a pluggable system known as the theme layer. Each theme can take control over most of Drupal's output, and has complete control over the CSS.
Inside Drupal, the theme layer is utilized by the use of the theme() function, which is passed the name of a component (the theme hook) and an array of variables. For example, theme('table', array('header' => $header, 'rows' => $rows)); Additionally, the theme() function can take an array of theme hooks, which can be used to provide 'fallback' implementations to allow for more specific control of output. For example, the function: theme(array('table__foo', 'table'), $variables) would look to see if 'table__foo' is registered anywhere; if it is not, it would 'fall back' to the generic 'table' implementation. This can be used to attach specific theme functions to named objects, allowing the themer more control over specific types of output.
As of Drupal 6, every theme hook is required to be registered by the module that owns it, so that Drupal can tell what to do with it and to make it simple for themes to identify and override the behavior for these calls.
The theme hooks are registered via hook_theme(), which returns an array of arrays with information about the hook. It describes the arguments the function or template will need, and provides defaults for the template in case they are not filled in. If the default implementation is a function, by convention it is named theme_HOOK().
Each module should provide a default implementation for theme_hooks that it registers. This implementation may be either a function or a template; if it is a function it must be specified via hook_theme(). By convention, default implementations of theme hooks are named theme_HOOK. Default template implementations are stored in the module directory.
Drupal's default template renderer is a simple PHP parsing engine that includes the template and stores the output. Drupal's theme engines can provide alternate template engines, such as XTemplate, Smarty and PHPTal. The most common template engine is PHPTemplate (included with Drupal and implemented in phptemplate.engine, which uses Drupal's default template renderer.
In order to create theme-specific implementations of these hooks, themes can implement their own version of theme hooks, either as functions or templates. These implementations will be used instead of the default implementation. If using a pure .theme without an engine, the .theme is required to implement its own version of hook_theme() to tell Drupal what it is implementing; themes utilizing an engine will have their well-named theming functions automatically registered for them. While this can vary based upon the theme engine, the standard set by phptemplate is that theme functions should be named THEMENAME_HOOK. For example, for Drupal's default theme (Bartik) to implement the 'table' hook, the phptemplate.engine would find bartik_table().
The theme system is described and defined in theme.inc.
End of "defgroup themeable".
See also
theme()
Files
| Name | Description |
|---|---|
| modules/aggregator/aggregator-feed-source.tpl.php | Default theme implementation to present the source of the feed. |
| modules/aggregator/aggregator-item.tpl.php | Default theme implementation to format an individual feed item for display on the aggregator page. |
| modules/aggregator/aggregator-summary-item.tpl.php | Default theme implementation to present a linked feed item for summaries. |
| modules/aggregator/aggregator-summary-items.tpl.php | Default theme implementation to present feeds as list items. |
| modules/aggregator/aggregator-wrapper.tpl.php | Default theme implementation to wrap aggregator content. |
| modules/block/block-admin-display-form.tpl.php | Default theme implementation to configure blocks. |
| modules/block/block.tpl.php | Default theme implementation to display a block. |
| modules/book/book-all-books-block.tpl.php | Default theme implementation for rendering book outlines within a block. |
| modules/book/book-export-html.tpl.php | Default theme implementation for printed version of book outline. |
| modules/book/book-navigation.tpl.php | Default theme implementation to navigate books. |
| modules/book/book-node-export-html.tpl.php | Default theme implementation for a single node in a printer-friendly outline. |
Functions & methods
| Name | Description |
|---|---|
| theme_admin_block | Returns HTML for an administrative block for display. |
| theme_admin_block_content | Returns HTML for the content of an administrative block. |
| theme_admin_page | Returns HTML for an administrative page. |
| theme_aggregator_block_item | Returns HTML for an individual feed item for display in the block. |
| theme_aggregator_categorize_items | Returns HTML for the aggregator page list form for assigning categories. |
| theme_aggregator_feed_source | Implemented using the aggregator-feed-source.tpl.php template. |
| theme_aggregator_item | Implemented using the aggregator-item.tpl.php template. |
| theme_aggregator_page_opml | Prints the OPML page for a feed. |
| theme_aggregator_page_rss | Prints the RSS page for a feed. |
| theme_aggregator_summary_item | Implemented using the aggregator-summary-item.tpl.php template. |
| theme_aggregator_summary_items | Implemented using the aggregator-summary-items.tpl.php template. |
| theme_aggregator_wrapper | Implemented using the aggregator-wrapper.tpl.php template. |
| theme_authorize_message | Returns HTML for a single log message from the authorize.php batch operation. |
| theme_authorize_report | Returns HTML for a report of the results from an operation run via authorize.php. |
| theme_block | Implemented using the block.tpl.php template. |
| theme_block_admin_display_form | Implemented using the block-admin-display-form.tpl.php template. |
| theme_book_admin_table | Returns HTML for a book administration form. |
| theme_book_all_books_block | Implemented using the book-all-books-block.tpl.php template. |
| theme_book_export_html | Implemented using the book-export-html.tpl.php template. |
| theme_book_navigation | Implemented using the book-navigation.tpl.php template. |
| theme_book_node_export_html | Implemented using the book-node-export-html.tpl.php template. |
| theme_book_title_link | Returns HTML for a link to a book title when used as a block title. |
| theme_breadcrumb | Returns HTML for a breadcrumb trail. |
| theme_button | Returns HTML for a button form element. |
| theme_checkbox | Returns HTML for a checkbox form element. |
| theme_checkboxes | Returns HTML for a set of checkbox form elements. |
| theme_color_scheme_form | Returns HTML for a theme's color form. |
| theme_comment | Implemented using the comment.tpl.php template. |
| theme_comment_block | Returns HTML for a list of recent comments to be displayed in the comment block. |
| theme_comment_post_forbidden | Returns HTML for a "you can't post comments" notice. |
| theme_comment_wrapper | Implemented using the comment-wrapper.tpl.php template. |
| theme_confirm_form | Returns HTML for a confirmation form. |
| theme_container | Returns HTML to wrap child elements in a container. |
| theme_dashboard | Returns HTML for the entire dashboard. |
| theme_dashboard_admin | Returns HTML for the non-customizable part of the dashboard page. |
| theme_dashboard_disabled_block | Returns HTML for disabled blocks, for use in dashboard customization mode. |
| theme_dashboard_disabled_blocks | Returns HTML for disabled blocks, for use in dashboard customization mode. |
| theme_dashboard_region | Returns HTML for a generic dashboard region. |
| theme_date | Returns HTML for a date selection form element. |
| theme_dblog_message | Returns HTML for a log message. |
| theme_exposed_filters | Returns HTML for an exposed filter form. |
| theme_feed_icon | Returns HTML for a feed icon. |
| theme_field | Implemented using the field.tpl.php template. |
| theme_field | Returns HTML for a field. |
| theme_fieldset | Returns HTML for a fieldset form element and its children. |
| theme_field_multiple_value_form | Returns HTML for an individual form element. |
| theme_field_ui_display_overview_table | Implemented using the field_ui-display-overview-table.tpl.php template. |
| theme_field_ui_field_overview_form | Implemented using the field_ui-field-overview-form.tpl.php template. |
| theme_field_ui_table | Returns HTML for Field UI overview tables. |
| theme_file | Returns HTML for a file upload form element. |
| theme_file_formatter_table | Returns HTML for a file attachments table. |
| theme_file_icon | Returns HTML for an image with an appropriate icon for the given file. |
| theme_file_link | Returns HTML for a link to a file. |
| theme_file_managed_file | Returns HTML for a managed file element. |
| theme_file_upload_help | Returns HTML for help text based on file upload validators. |
| theme_file_widget | Returns HTML for an individual file upload widget. |
| theme_file_widget_multiple | Returns HTML for a group of file upload widgets. |
| theme_filter_admin_format_filter_order | Returns HTML for a text format's filter order form. |
| theme_filter_admin_overview | Returns HTML for the text format administration overview form. |
| theme_filter_guidelines | Returns HTML for guidelines for a text format. |
| theme_filter_tips | Returns HTML for a set of filter tips. |
| theme_filter_tips_more_info | Returns HTML for a link to the more extensive filter tips. |
| theme_form | Returns HTML for a form. |
| theme_form_element | Returns HTML for a form element. |
| theme_form_element_label | Returns HTML for a form element label and required marker. |
| theme_form_required_marker | Returns HTML for a marker for required form elements. |
| theme_forums | Implemented using the forums.tpl.php template. |
| theme_forum_form | Returns HTML for a forum form. |
| theme_forum_icon | Implemented using the forum-icon.tpl.php template. |
| theme_forum_list | Implemented using the forum-list.tpl.php template. |
| theme_forum_submitted | Implemented using the forum-submitted.tpl.php template. |
| theme_forum_topic_list | Implemented using the forum-topic-list.tpl.php template. |
| theme_hidden | Returns HTML for a hidden form element. |
| theme_html | Implemented using the html.tpl.php template. |
| theme_html_tag | Returns HTML for a generic HTML tag with attributes. |
| theme_image | Returns HTML for an image. |
| theme_image_anchor | Returns HTML for a 3x3 grid of checkboxes for image anchors. |
| theme_image_button | Returns HTML for an image button form element. |
| theme_image_crop_summary | Returns HTML for a summary of an image crop effect. |
| theme_image_formatter | Returns HTML for an image field formatter. |
| theme_image_resize_summary | Returns HTML for a summary of an image resize effect. |
| theme_image_rotate_summary | Returns HTML for a summary of an image rotate effect. |
| theme_image_scale_summary | Returns HTML for a summary of an image scale effect. |
| theme_image_style | Returns HTML for an image using a specific image style. |
| theme_image_style_effects | Returns HTML for a listing of the effects within a specific image style. |
| theme_image_style_list | Returns HTML for the page containing the list of image styles. |
| theme_image_style_preview | Returns HTML for a preview of an image style. |
| theme_image_widget | Returns HTML for an image field widget. |
| theme_indentation | Returns HTML for an indentation div; used for drag and drop tables. |
| theme_item_list | Returns HTML for a list or nested list of items. |
| theme_link | Returns HTML for a link. |
| theme_links | Returns HTML for a set of links. |
| theme_locale_date_format_form | Returns HTML for a locale date format form. |
| theme_locale_languages_configure_form | Returns HTML for a language configuration form. |
| theme_locale_languages_overview_form | Returns HTML for the language overview form. |
| theme_maintenance_page | Implemented using the maintenance-page.tpl.php template. |
| theme_mark | Returns HTML for a marker for new or updated content. |
| theme_menu_admin_overview | Returns HTML for a menu title and description for the menu overview page. |
| theme_menu_link | Returns HTML for a menu link and submenu. |
| theme_menu_local_action | Returns HTML for a single local action link. |
| theme_menu_local_task | Returns HTML for a single local task link. |
| theme_menu_local_tasks | Returns HTML for primary and secondary local tasks. |
| theme_menu_overview_form | Returns HTML for the menu overview form into a table. |
| theme_menu_tree | Returns HTML for a wrapper for a menu sub-tree. |
| theme_more_help_link | Returns HTML for a "more help" link. |
| theme_more_link | Returns HTML for a "more" link, like those used in blocks. |
| theme_node | Implemented using the node.tpl.php template. |
| theme_node_add_list | Returns HTML for a list of available node types for node creation. |
| theme_node_admin_overview | Returns HTML for a node type description for the content type admin overview page. |
| theme_node_preview | Returns HTML for a node preview for display during node creation and editing. |
| theme_node_recent_block | Returns HTML for a list of recent content. |
| theme_node_recent_content | Returns HTML for a recent node to be displayed in the recent content block. |
| theme_node_search_admin | Returns HTML for the content ranking part of the search settings admin page. |
| theme_options_none | Returns HTML for the label for the empty value for options that are not required. |
| theme_page | Implemented using the page.tpl.php template. |
| theme_pager | Returns HTML for a query pager. |
| theme_pager_first | Returns HTML for the "first page" link in a query pager. |
| theme_pager_last | Returns HTML for the "last page" link in query pager. |
| theme_pager_link | Returns HTML for a link to a specific query result page. |
| theme_pager_next | Returns HTML for the "next page" link in a query pager. |
| theme_pager_previous | Returns HTML for the "previous page" link in a query pager. |
| theme_password | Returns HTML for a password form element. |
| theme_poll_bar | Implemented using the poll-bar.tpl.php template. |
| theme_poll_bar__block | Implemented using the poll-bar--block.tpl.php template. |
| theme_poll_choices | Returns HTML for an admin poll form for choices. |
| theme_poll_results | Implemented using the poll-results.tpl.php template. |
| theme_poll_results__block | Implemented using the poll-results--block.tpl.php template. |
| theme_poll_vote | Implemented using the poll-vote.tpl.php template. |
| theme_profile_admin_overview | Returns HTML for the profile field overview form into a drag and drop enabled table. |
| theme_profile_block | Implemented using the profile-block.tpl.php template. |
| theme_profile_listing | Implemented using the profile-listing.tpl.php template. |
| theme_profile_wrapper | Implemented using the profile-wrapper.tpl.php template. |
| theme_progress_bar | Returns HTML for a progress bar. |
| theme_radio | Returns HTML for a radio button form element. |
| theme_radios | Returns HTML for a set of radio button form elements. |
| theme_rdf_metadata | Returns HTML for a series of empty spans for exporting RDF metadata in RDFa. |
| theme_rdf_template_variable_wrapper | Returns HTML for a template variable wrapped in an HTML element with the RDF attributes. |
| theme_region | Implemented using the region.tpl.php template. |
| theme_search_block_form | Implemented using the search-block-form.tpl.php template. |
| theme_search_result | Implemented using the search-result.tpl.php template. |
| theme_search_results | Implemented using the search-results.tpl.php template. |
| theme_select | Returns HTML for a select form element. |
| theme_shortcut_set_customize | Returns HTML for a shortcut set customization form. |
| theme_simpletest_result_summary | Returns HTML for the summary status of a simpletest result. |
| theme_simpletest_test_table | Returns HTML for a test list generated by simpletest_test_form() into a table. |
| theme_status_messages | Returns HTML for status and/or error messages, grouped by type. |
| theme_status_report | Returns HTML for the status report. |
| theme_submit | Returns HTML for a submit button form element. |
| theme_system_admin_index | Returns HTML for the output of the dashboard page. |
| theme_system_compact_link | Returns HTML for a link to show or hide inline help descriptions. |
| theme_system_date_time_settings | Returns HTML for the date settings form. |
| theme_system_modules_fieldset | Returns HTML for the modules form. |
| theme_system_modules_incompatible | Returns HTML for a message about incompatible modules. |
| theme_system_modules_uninstall | Returns HTML for a table of currently disabled modules. |
| theme_system_powered_by | Returns HTML for the Powered by Drupal text. |
| theme_system_settings_form | Returns HTML for a system settings form. |
| theme_system_themes_page | Returns HTML for the Appearance page. |
| theme_table | Returns HTML for a table. |
| theme_tableselect | Returns HTML for a table with radio buttons or checkboxes. |
| theme_tablesort_indicator | Returns HTML for a sort icon. |
| theme_task_list | Returns HTML for a list of maintenance tasks to perform. |
| theme_taxonomy_overview_terms | Returns HTML for a terms overview form as a sortable list of terms. |
| theme_taxonomy_overview_vocabularies | Returns HTML for the vocabulary overview form as a sortable list of vocabularies. |
| theme_taxonomy_term | Implemented using the taxonomy-term.tpl.php template. |
| theme_textarea | Returns HTML for a textarea form element. |
| theme_textfield | Returns HTML for a textfield form element. |
| theme_text_format_wrapper | Returns HTML for a text format-enabled form element. |
| theme_toolbar | Implemented using the toolbar.tpl.php template. |
| theme_trigger_display | Returns HTML for the form showing actions assigned to a trigger. |
| theme_update_last_check | Returns HTML for the last time we checked for update data. |
| theme_update_manager_update_form | Returns HTML for the first page in the update manager wizard to select projects. |
| theme_update_report | Returns HTML for the project status report. |
| theme_update_version | Returns HTML for the version display of a project. |
| theme_username | Returns HTML for a username, potentially linked to the user's page. |
| theme_user_admin_permissions | Returns HTML for the administer permissions page. |
| theme_user_admin_roles | Returns HTML for the role order and new role form. |
| theme_user_list | Returns HTML for a list of users. |
| theme_user_permission_description | Returns HTML for an individual permission description. |
| theme_user_picture | Implemented using the user-picture.tpl.php template. |
| theme_user_profile | Implemented using the user-profile.tpl.php template. |
| theme_user_profile_category | Implemented using the user-profile-category.tpl.php template. |
| theme_user_profile_item | Implemented using the user-profile-item.tpl.php template. |
| theme_user_signature | Returns HTML for a user signature. |
| theme_vertical_tabs | Returns HTML for an element's children fieldsets as vertical tabs. |
File
- modules/
system/ theme.api.php, line 3
Comments
Why two theme_field function links?
This page currently lists two separate functions with the identical name "theme_field," one of which says it is "Implemented using the field.tpl.php template," and one which says it "Returns HTML for a field." This is rathe confusing.
When I click through to the first "theme_field" link, it takes me to a function which simply contains a comment that says, "This function is never used; see the corresponding template file instead." However, clicking through to http://api.drupal.org/api/drupal/modules--field--theme--field.tpl.php/7 takes me to a page which says, "This file is not used and is here as a starting point for customization only."
Clicking through to the second "theme_field" link at http://api.drupal.org/api/drupal/modules--field--field.module/function/t... takes me to more helpful documentation which explains that
field.tpl.php can be found in the "modules/field/theme" directory. By reading the two theme_field links against each other, it is possible to figure things out. However, having two separate links is somewhat confusing, and it would be nice if this could be fixed.
Cheap NBA Shoes
Cheap NBA Shoes
NBA Basketball Shoes
nike running shoes men
nike air max
LeBron James
Derrick Rose
Ken Griffey
Anfernee Hardaway
Blake Griffin
Kobe Bryant
Dwight Howard
Tracy McGrady
Glibert Arenas
Ray Allen
Dwyane Wade
Nike Zoom Hyperfuse
Kevin Durant
Roger Federer
Nike Air Hypershox 2011
Nike Zoom Parker
TS Speedcut XR
Jordan Air Shoes
cheapmaxsportshoes
discount nike air max
Air Max 2012
nike air max 2011
Air Max 95
Air Max 24-7
Air Max 2009
Air Max 2010
Air Max 2011
Air Max 180
Air Max 87
Air Max 90
Air Max 91
Air Max BW
Air Max LTD
Air Max TN
Air Max Skyline
Air Max Terra Ninety
Timberland roll-top
Timberland roll-top Timberlands For Men boots is made of good quality material ,it can keep your feet dry, whatever the elements throw at you. as we introduce it ,now more and Cheap Timberlands more customer become love it . These boots can keep dry, stable and comfortable under any circumstances. Timberland boots women also allow people to show their high performances with defferent styles of clothing. so it is mix with the good quality and fashion ,it is a good choice for you .
Timberland Boots are fashion Shoes Timberland and stylish. This kind of Shoes Timberland can protect your ankle from hurt. Timberland Roll-top Boots with rubber lug outsole for traction and durability.Timberland men You will enjoy the wonderful comfortable and relaxed all the time.So wonderful! Timberland women no miss it .
good quality with big discount now for you .on our store have a lot of discount timberland shoes for you . you can come to check it . Timberland kids you may like some styles also .hope http://www.timberlanddiscounted.com/ you have a good time when shopping on our store.
prada high top sneaker
To learn more cheap prada shoes about the latest It Bag and see how even a man looks amazing carrying it read more contact prada looks just as good carrying the over-sized beauty.prada men shoes Also like this series prada handbag's Florence Welch, as Florence http://www.buycheappradashoessale.com/ And The Machine lead singer of the Brit won the "Best critics award."
"THE MASK" This film makes "sexy girl" Cameron prada high top sneaker Diaz come to the fore, became the eye of the star. Since then Cameron has entered a new area. Becoming the most red of the U.S. film actress and a chicago the devil Prada Men wears prada nomination. She is very popular winter series of leather Men Canvas Prada handbag.
It may be identical proud instant Men Casual Shoes for each of the ladies, who possess the zeal for custom Men Sneakers made handbags, once they are carrying cheap prada High Top Men Sneakers handbags. The meaning of the custom made Patent Leather Shoes bag to some lady may properly be considered a little something not fast for just about any dude to truly understand.