You are here

function title_process_page in Title 7

Process variables for page.tpl.php.

File

./title.core.inc, line 215
Provide field replacement information.

Code

function title_process_page(&$variables) {

  // Ugly but necessary: there is no standardized way to tell if the current
  // page is an entity view page. This information should be injected here in
  // some form by entity-defining modules.
  $entity_types = array(
    'comment' => 1,
    'node' => 1,
    'taxonomy_term' => 2,
  );
  foreach ($entity_types as $entity_type => $position) {
    if ($entity = menu_get_object($entity_type, $position)) {
      break;
    }
  }
  if ($entity) {
    title_field_replacement_hide_label($entity_type, $entity, $variables, TRUE);
  }
}