template.php in Taxonomy Title 5
File
template.phpView source
<?php
/**
* Override or insert PHPTemplate variables into the templates.
*/
function _phptemplate_variables($hook, $vars) {
switch ($hook) {
case 'page':
// for TAXONOMY TITLE
if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2)) && arg(2) > 0) {
// taxonomy term page - check for custom page title
$title = _taxonomy_title_get_title(arg(2));
if ($title != '') {
// sets the meta title
drupal_set_title($title);
// assures the heading is also set
$vars['title'] = $title;
}
}
// for TAXONOMY TITLE
break;
}
return $vars;
}
Functions
Name![]() |
Description |
---|---|
_phptemplate_variables | Override or insert PHPTemplate variables into the templates. |