From 801dd782f52b9cf64d9dd4980c0e8b2c6d30cb38 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 13 Dec 2003 18:50:09 +0000 Subject: [PATCH] - 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. --- themes/xtemplate/xtemplate.theme | 10 +++++++--- themes/xtemplate/xtemplate.xtmpl | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/themes/xtemplate/xtemplate.theme b/themes/xtemplate/xtemplate.theme index 67f4807837a..eed67da0e91 100644 --- a/themes/xtemplate/xtemplate.theme +++ b/themes/xtemplate/xtemplate.theme @@ -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", ""), "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"); diff --git a/themes/xtemplate/xtemplate.xtmpl b/themes/xtemplate/xtemplate.xtmpl index f481ae8a955..d03ae4caf28 100644 --- a/themes/xtemplate/xtemplate.xtmpl +++ b/themes/xtemplate/xtemplate.xtmpl @@ -42,8 +42,10 @@
{mission}
+ {breadcrumb} -

{body_title}

+

{title}

+
{help}