function template_process_page
template_process_page(&$variables)
Process variables for page.tpl.php
Perform final addition of variables before passing them into the template. To customize these variables, simply set them in an earlier step.
See also
File
- includes/theme.inc, line 2691
- The theme system, which controls the output of Drupal.
Code
function template_process_page(&$variables) { if (!isset($variables['breadcrumb'])) { // Build the breadcrumb last, so as to increase the chance of being able to // re-use the cache of an already rendered menu containing the active link // for the current page. // @see menu_tree_page_data() $variables['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb())); } if (!isset($variables['title'])) { $variables['title'] = drupal_get_title(); } // Generate messages last in order to capture as many as possible for the // current page. if (!isset($variables['messages'])) { $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : ''; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!theme.inc/function/template_process_page/7.x