the page title is now dynamic

This commit is contained in:
tmont 2008-10-15 07:13:44 +00:00
parent 44e5dcba18
commit 12283bc63a
2 changed files with 9 additions and 2 deletions

View File

@ -54,7 +54,7 @@
}
try {
$templateView = new PanaceaTemplateView();
$templateView = new PanaceaTemplateView($this->page);
$templateView->addView($this->viewFactory->getView($this->page, $request->__toString()));
return $templateView;
}

View File

@ -27,11 +27,18 @@
*
* @author Tommy Montgomery
* @since 2008-10-14
*
* @param string $title The title of the page
*/
public function __construct() {
public function __construct($title = 'Home') {
if (!is_string($title)) {
throw new InvalidTypeException(1, 'string', $title);
}
parent::__construct();
$this->defaultTitle = 'Panacea';
$this->title = (!empty($title)) ? $title : 'Home';
}
/**