diff --git a/src/UNL/Catalog/SubjectArea.php b/src/UNL/Catalog/SubjectArea.php index e5493d25aeff0b6c0f625c692b3f8710f99f9926..7880456aa66a5380f4bfdf2ea7029ab109fd3e54 100644 --- a/src/UNL/Catalog/SubjectArea.php +++ b/src/UNL/Catalog/SubjectArea.php @@ -3,8 +3,6 @@ namespace UNL\Catalog; class SubjectArea extends \UNL_Services_CourseApproval_SubjectArea { - public $title; - function __construct($options = array()) { if (isset($options['title'])) { @@ -31,6 +29,23 @@ class SubjectArea extends \UNL_Services_CourseApproval_SubjectArea } return false; } + + public function __get($var) + { + if ($var == 'title') { + return $this->getTitle(); + } + } + + public function getTitle() + { + if (isset($this->title)) { + return $this->title; + } + $areas = new SubjectAreas(); + $this->title = $areas[$this->subject]; + return $this->title; + } function __toString() { diff --git a/www/templates/html/UNL/Catalog/SubjectArea.tpl.php b/www/templates/html/UNL/Catalog/SubjectArea.tpl.php index 16c0137992c4ce4adcb369fb0a7801537b2aaf68..c371eb15987d2e727583123797e56765ffe2e8c2 100644 --- a/www/templates/html/UNL/Catalog/SubjectArea.tpl.php +++ b/www/templates/html/UNL/Catalog/SubjectArea.tpl.php @@ -1,13 +1,13 @@ <?php if ($controller->options['model'] == 'UNL\Catalog\SubjectArea') { $url = $controller->getURL(); - $page->doctitle = '<title>'.$context->subject.' | Bulletin | University of Nebraska-Lincoln</title>'; - $page->pagetitle = '<h1>'.$context->subject.'</h1>'; + $page->doctitle = '<title>'.$context->title.' Courses | Bulletin | University of Nebraska-Lincoln</title>'; + $page->pagetitle = '<h1>'.$context->title.' Courses</h1>'; $page->breadcrumbs = ' <ul> <li><a href="http://www.unl.edu/">UNL</a></li> <li><a href="'.$url.'">Undergraduate Bulletin</a></li> - <li>'.$context->subject.'</li> + <li>'.$context->title.' Courses</li> </ul> '; }