Skip to content
Snippets Groups Projects
Commit ac64b6f2 authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

use $head_title rather than unl_wdn_head_title(), setting it in unl_wdn_preprocess_html()

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@124 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 521add75
Branches
Tags
No related merge requests found
......@@ -46,7 +46,7 @@ if (theme_get_setting('use_base')) {
$t->head .= '<base href="' . url('<front>', array('absolute' => TRUE)) . '" />' . PHP_EOL;
}
$t->doctitle = '<title>'. unl_wdn_head_title() .'</title>';
$t->doctitle = '<title>'.$head_title.'</title>';
$html = $t->toHtml();
......
<?php
function unl_wdn_preprocess_html(&$vars, $hook)
{
/**
* Change the <title> tag to UNL format: UNL | Department | Section | Page
*/
$head_title[] = 'Home';
$trail = menu_get_active_trail();
foreach ($trail as $item) {
if ($item['type'] & MENU_VISIBLE_IN_BREADCRUMB) {
$head_title[] = $item['title'];
}
}
// Change 'Home' to be $site_name
array_unshift($head_title, str_replace( 'Home', variable_get('site_name', 'Department'), array_shift($head_title)));
//Prepend UNL
array_unshift($head_title, 'UNL');
$vars['head_title'] = implode(' | ', $head_title);
}
function unl_wdn_get_instance()
{
static $instance;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment