From bd04b0dbb1656184d269f662c1519880e2ef7858 Mon Sep 17 00:00:00 2001
From: Brett Bieber <bieber@unl.edu>
Date: Fri, 10 Sep 2010 15:58:36 +0000
Subject: [PATCH] Get document title displaying correctly.

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@158 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 sites/all/themes/unl_wdn/template.php | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sites/all/themes/unl_wdn/template.php b/sites/all/themes/unl_wdn/template.php
index 292dfb7f..d7c7528e 100644
--- a/sites/all/themes/unl_wdn/template.php
+++ b/sites/all/themes/unl_wdn/template.php
@@ -8,10 +8,16 @@ function unl_wdn_preprocess_html(&$vars, $hook)
   $head_title[] = 'Home';
   
   $trail = menu_get_active_trail();
-  
   foreach ($trail as $item) {
     if ($item['type'] & MENU_VISIBLE_IN_BREADCRUMB) {
-      $head_title[] = $item['title'];
+      if (isset($item['title']) && !empty($item['title'])) {
+          $head_title[] = $item['title'];
+      }
+      if (isset($item['page_arguments'],
+                $item['page_arguments'][0],
+                $item['page_arguments'][0]->title)) {
+          $head_title[] = $item['page_arguments'][0]->title;
+      }
     }
   }
   
-- 
GitLab