the page title is now dynamic
This commit is contained in:
		
							parent
							
								
									44e5dcba18
								
							
						
					
					
						commit
						12283bc63a
					
				| @ -54,7 +54,7 @@ | |||||||
| 			} | 			} | ||||||
| 			 | 			 | ||||||
| 			try { | 			try { | ||||||
| 				$templateView = new PanaceaTemplateView(); | 				$templateView = new PanaceaTemplateView($this->page); | ||||||
| 				$templateView->addView($this->viewFactory->getView($this->page, $request->__toString())); | 				$templateView->addView($this->viewFactory->getView($this->page, $request->__toString())); | ||||||
| 				return $templateView; | 				return $templateView; | ||||||
| 			} | 			} | ||||||
|  | |||||||
| @ -27,11 +27,18 @@ | |||||||
| 		 * | 		 * | ||||||
| 		 * @author Tommy Montgomery | 		 * @author Tommy Montgomery | ||||||
| 		 * @since  2008-10-14 | 		 * @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(); | 			parent::__construct(); | ||||||
| 			 | 			 | ||||||
| 			$this->defaultTitle = 'Panacea'; | 			$this->defaultTitle = 'Panacea'; | ||||||
|  | 			$this->title = (!empty($title)) ? $title : 'Home'; | ||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
| 		/** | 		/** | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user