Same filename and directory in other branches
- 6.x themes/garland/template.php
- 7.x themes/garland/template.php
File
themes/garland/template.php
View source
<?php
function phptemplate_body_class($sidebar_left, $sidebar_right) {
if ($sidebar_left != '' && $sidebar_right != '') {
$class = 'sidebars';
}
else {
if ($sidebar_left != '') {
$class = 'sidebar-left';
}
if ($sidebar_right != '') {
$class = 'sidebar-right';
}
}
if (isset($class)) {
print ' class="' . $class . '"';
}
}
function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return '<div class="breadcrumb">' . implode(' › ', $breadcrumb) . '</div>';
}
}
function phptemplate_comment_wrapper($content, $type = null) {
static $node_type;
if (isset($type)) {
$node_type = $type;
}
if (!$content || $node_type == 'forum') {
return '<div id="comments">' . $content . '</div>';
}
else {
return '<div id="comments"><h2 class="comments">' . t('Comments') . '</h2>' . $content . '</div>';
}
}
function _phptemplate_variables($hook, $vars) {
if ($hook == 'page') {
if ($secondary = menu_secondary_local_tasks()) {
$output = '<span class="clear"></span>';
$output .= "<ul class=\"tabs secondary\">\n" . $secondary . "</ul>\n";
$vars['tabs2'] = $output;
}
if (module_exists('color')) {
_color_page_alter($vars);
}
return $vars;
}
return array();
}
function phptemplate_menu_local_tasks() {
$output = '';
if ($primary = menu_primary_local_tasks()) {
$output .= "<ul class=\"tabs primary\">\n" . $primary . "</ul>\n";
}
return $output;
}
Functions