From b4619ac5d68d66e97ace12ae4bbaa7cd8d4e7c8e Mon Sep 17 00:00:00 2001
From: Brett Bieber <brett.bieber@gmail.com>
Date: Tue, 24 Sep 2013 15:41:11 -0500
Subject: [PATCH] Display correct doctitle, page title, and breadcrumbs for
 courses

---
 .../UNL/Services/CourseApproval/Course.tpl.php   | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/www/templates/html/UNL/Services/CourseApproval/Course.tpl.php b/www/templates/html/UNL/Services/CourseApproval/Course.tpl.php
index 74f9ed1..fe4c9ea 100644
--- a/www/templates/html/UNL/Services/CourseApproval/Course.tpl.php
+++ b/www/templates/html/UNL/Services/CourseApproval/Course.tpl.php
@@ -69,19 +69,19 @@
         }
     }
 
-    if ($controller->options['model'] == 'UNL\Catalog\Course') {
-        Controller::setReplacementData('head', '
+if ($controller->options['model'] == 'UNL\Catalog\Listing') {
+        $page->head = $page->getRaw('head') .'
         <link rel="alternate" type="text/xml" href="'.$permalink.'?format=xml" />
         <link rel="alternate" type="text/javascript" href="'.$permalink.'?format=json" />
-        <link rel="alternate" type="text/html" href="'.$permalink.'?format=partial" />');
-        Controller::setReplacementData('doctitle', $subject.' '.$listings.': '.$context->title.' | Undergraduate Bulletin | University of Nebraska-Lincoln');
-        Controller::setReplacementData('breadcrumbs', '
+        <link rel="alternate" type="text/html" href="'.$permalink.'?format=partial" />';
+        $page->doctitle = '<title>'.$subject.' '.$listings.': '.$context->title.' | University of Nebraska-Lincoln</title>';
+        $page->breadcrumbs = '
     <ul>
         <li><a href="http://www.unl.edu/">UNL</a></li>
-        <li><a href="'.$url.'">Undergraduate Bulletin</a></li>
+        <li><a href="'.$controller->getURL().'courses/">Courses</a></li>
         <li>'.$subject.' '.$listings.': '.$context->title.'</li>
     </ul>
-    ');
+    ';
         echo '<dl>';
     }
     
@@ -155,7 +155,7 @@
                 if (!empty($context->aceOutcomes)) {
                     $ace = '';
                     foreach($context->aceOutcomes as $outcome) {
-                        $ace .= '<abbr title="'.UNL_UndergraduateBulletin_ACE::$descriptions[$outcome].'">'.$outcome.'</abbr>, ';
+                        $ace .= '<abbr title="'.UNL\Catalog\ACE::$descriptions[$outcome].'">'.$outcome.'</abbr>, ';
                     }
                     $ace = trim($ace, ', ');
                     echo  '<tr class="aceOutcomes">
-- 
GitLab