public function indexAction($value = '') { $nav = new SxCms_Nav($this->_getParam('lng', 'nl')); $nav->setBounds(0, 4); $this->view->lng = $this->_getParam('lng'); $this->view->menus = $nav->items(); }
public function reloadItems() { $pageProxy = new SxCms_Page_Proxy(); $xmlMapper = new SxCms_Page_TreeMapper(); $xmlMapper->loadSource(APPLICATION_PATH . '/var/navigation.xml'); $items = $xmlMapper->map($pageProxy->getSiteTree($this->language, false, null, true)); $menus = array(); foreach ($items as $page) { if (strtotime($page->getDatePublished()) <= time() && (strtotime($page->getDateExpired()) >= time() || is_null($page->getDateExpired()) && $page->getInvisible() == 0)) { $page->setActive(false); $menus[$page->getId()] = $page; } } self::$items = $menus; }
public function multilevelmenuAction() { $nav = new SxCms_Nav($this->_getParam('lng', 'nl')); $nav->setBounds(0, 4); if (true == ($page = $this->_getParam('page'))) { $nav->setActivePage($page); } $this->view->lng = $this->_getParam('lng'); $this->view->menus = $nav->items(); }