- Don't display a breadcrumb trail and title when there is no acitve page title.

This stops the Xtemplate theme from displaying a 'Home' link on the front page.
4.4.x
Dries Buytaert 2003-12-13 18:50:09 +00:00
parent fa2ec338dc
commit 801dd782f5
2 changed files with 10 additions and 4 deletions

View File

@ -91,17 +91,21 @@ function xtemplate_header() {
$xtemplate->template->assign(array(
"head_title" => (drupal_get_title() ? drupal_get_title() ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")),
"body_title" => drupal_get_title(),
"site" => variable_get("site_name", "drupal"),
"head" => theme_head(),
"stylesheet" => variable_get("xtemplate_stylesheet", "themes/xtemplate/xtemplate.css"),
"onload_attributes" => theme_onload_attribute(),
"logo" => variable_get("xtemplate_logo", "<img src=\"themes/xtemplate/images/druplicon.gif\" />"),
"primary_links" => variable_get("xtemplate_primary_links", l("edit primary links", "admin/system/themes/xtemplate")),
"secondary_links" => variable_get("xtemplate_secondary_links", l("edit secondary links", "admin/system/themes/xtemplate")),
"breadcrumb" => theme("breadcrumb", drupal_get_breadcrumb())
"secondary_links" => variable_get("xtemplate_secondary_links", l("edit secondary links", "admin/system/themes/xtemplate"))
));
if ($title = drupal_get_title()) {
$xtemplate->template->assign("title", $title);
$xtemplate->template->assign("breadcrumb", theme("breadcrumb", drupal_get_breadcrumb()));
$xtemplate->template->parse("header.title");
}
if ($help = menu_get_active_help()) {
$xtemplate->template->assign("help", $help);
$xtemplate->template->parse("header.help");

View File

@ -42,8 +42,10 @@
<div id="mission">{mission}</div>
<!-- END: mission -->
<div id="main">
<!-- BEGIN: title -->
{breadcrumb}
<h1 class="title">{body_title}</h1>
<h1 class="title">{title}</h1>
<!-- END: title -->
<!-- BEGIN: help -->
<div id="help">{help}</div>
<!-- END: help -->