public function indexAction() { // Force response to identify itself as XML, not sure it belongs in a controller $this->getResponse()->setHeader('Content-type', 'application/xml'); $this->_helper->layout->disableLayout(); $navigation = new Zend_Navigation(); /* This is going to be hugely dirty. If this still exists in a few months you have my sincere apologies I only have a day to write this sitemap and I fully intend to come back and neaten it up at some point */ // Home $page = new Zend_Navigation_Page_Uri(); $page->label = 'Home'; $page->uri = '/home'; $page->changefreq = 'daily'; $navigation->addPage($page); // Careers $page = new Zend_Navigation_Page_Uri(); $page->label = 'Careers'; $page->uri = '/careers'; $page->changefreq = 'daily'; $navigation->addPage($page); // News $page = new Zend_Navigation_Page_Uri(); $page->label = 'News'; $page->uri = '/news'; $page->changefreq = 'weekly'; $navigation->addPage($page); $page = new Zend_Navigation_Page_Uri(); $page->label = 'Tenants News'; $page->uri = '/tenants/news'; $page->changefreq = 'weekly'; $navigation->addPage($page); $page = new Zend_Navigation_Page_Uri(); $page->label = 'Landlords News'; $page->uri = '/landlords/news'; $page->changefreq = 'weekly'; $navigation->addPage($page); $page = new Zend_Navigation_Page_Uri(); $page->label = 'Agents News'; $page->uri = '/letting-agents/news'; $page->changefreq = 'weekly'; $navigation->addPage($page); $pageModel = new Datasource_Cms_Pages(); $cmsPages = $pageModel->getPageList(); foreach ($cmsPages as $cmsPage) { if (!in_array($cmsPage['url'], $this->_suppressCmsUrl)) { $page = new Zend_Navigation_Page_Uri(); $page->label = $cmsPage['title']; $page->uri = '/' . $cmsPage['url']; $page->changefreq = 'hourly'; $navigation->addPage($page); } } $this->view->navigation($navigation); }
/** * Show a list of site pages in the admin system * * @return void */ public function indexAction() { $this->view->currentPage = 'pages'; $pages = new Datasource_Cms_Pages(); $pagesArray = $pages->getPageList(); $pageList = $this->view->partialLoop('partials/pages-row.phtml', $pagesArray); $this->view->pageList = $pageList; $passThrough = $this->_helper->getHelper('FlashMessenger')->getMessages(); if (count($passThrough) > 0) { if (isset($passThrough[0]['saved'])) { if ($passThrough[0]['saved'] == true) { $this->view->saved = true; } } if (isset($passThrough[0]['deleted'])) { if ($passThrough[0]['deleted'] == true) { $this->view->deleted = true; } } if (isset($passThrough[0]['errorMessage'])) { $this->view->errorMessage = $passThrough[0]['errorMessage']; } } }