Skip to content
Snippets Groups Projects
Commit 738e9e72 authored by Brett Bieber's avatar Brett Bieber
Browse files

Display the proper subject area title when requested

parent a0e96f89
Branches
No related tags found
No related merge requests found
......@@ -3,8 +3,6 @@ namespace UNL\Catalog;
class SubjectArea extends \UNL_Services_CourseApproval_SubjectArea
{
public $title;
function __construct($options = array())
{
if (isset($options['title'])) {
......@@ -32,6 +30,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()
{
return $this->subject;
......
<?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>
';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment