Esempio n. 1
0
	/**
	 * Initialisation.
	 * Initialises the view, templaters and all other necessary objects for
	 * successfully creating the response.
	 */
	protected function initialize()
	{
		// Get current node info
		$this->node = new vBCms_Item_Content($this->node_segment);

		// Prenotify the node item of info we will require
		$info_flags = 	vBCms_Item_Content::INFO_NODE |
						vBCms_Item_Content::INFO_PARENTS |
						vBCms_Item_Content::INFO_CONFIG;
		$this->node->requireInfo($info_flags);

		if (!$this->node->isValid())
		{
			$this->node = new vBCms_Item_Content( vB::$vbulletin->options['default_page']);
			vBCms_NavBar::prepareNavBar($this->node);
			throw (new vB_Exception_404(new vB_Phrase('error', 'page_not_found')));
		}
		
		// Prepare navbar
		vBCms_NavBar::prepareNavBar($this->node);
	}