From 606dfde1eae4efe6ad9efe7f7ba72c81d5f3b483 Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Tue, 29 Jun 2010 19:29:30 +0000
Subject: [PATCH] Add pagetitle to the html <title>.

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

diff --git a/sites/all/themes/unl_wdn/template.php b/sites/all/themes/unl_wdn/template.php
index 1dfe46dc..5a0d4f75 100644
--- a/sites/all/themes/unl_wdn/template.php
+++ b/sites/all/themes/unl_wdn/template.php
@@ -20,14 +20,14 @@ function unl_wdn_breadcrumb($variables)
 {
     $breadcrumbs = $variables['breadcrumb'];
 
-	if (count($breadcrumbs) == 0) {
-		$breadcrumbs[] = variable_get('site_name', 'Department');
-	} else {
-	    //Change 'Home' to be $site_name
-	    array_unshift($breadcrumbs,
-	                  str_replace('Home', variable_get('site_name', 'Department'),
-	                  array_shift($breadcrumbs)));
-	}
+    if (count($breadcrumbs) == 0) {
+        $breadcrumbs[] = variable_get('site_name', 'Department');
+    } else {
+        //Change 'Home' to be $site_name
+        array_unshift($breadcrumbs,
+                      str_replace('Home', variable_get('site_name', 'Department'),
+                      array_shift($breadcrumbs)));
+    }
     //Prepend UNL
     array_unshift($breadcrumbs, '<a href="http://www.unl.edu/">UNL</a>');
     
@@ -65,6 +65,9 @@ function unl_wdn_head_title()
     
     //Prepend UNL
     array_unshift($path, 'UNL');
+    if (!drupal_is_front_page()) {
+        $path[] = drupal_get_title();
+    }
     
     return implode(' | ', $path);
 }
@@ -128,11 +131,11 @@ function unl_wdn_status_messages($variables)
         $type = ucfirst($type);
         $output .= <<<EOF
 <div class="wdn_notice">
-	<div class="close">
-		<a href="#" title="Close this notice">Close this notice</a>
-	</div>
-	<div class="message">
-	    <h3>$type</h3>
+    <div class="close">
+        <a href="#" title="Close this notice">Close this notice</a>
+    </div>
+    <div class="message">
+        <h3>$type</h3>
 EOF;
         if (count($messages) > 1) {
             $output .= '<ul>' . PHP_EOL;
-- 
GitLab