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 get() { $request = Zend_Controller_Front::getInstance()->getRequest(); $nav = new SxCms_Nav($request->getParam('lng', 'nl')); $nav->setBounds(1, 3); $this->view->lng = $request->getParam('lng'); $this->view->menus = $nav->sitemapItems(); $nav->setBounds(1, 2); $this->view->topmenus = $nav->sitemapItems(); }
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 sitemapAction() { $nav = new SxCms_Nav($this->_getParam('lng', 'nl')); $nav->setBounds(1, 3); $this->view->lng = $this->_getParam('lng'); $this->view->menus = $nav->sitemapItems(); $nav->setBounds(1, 2); $this->view->topmenus = $nav->sitemapItems(); }