public function contactsAction() { $page = Page::findCachedBySlug('contacts'); if (!$page) { throw new Exception("Page 'contacts' not found"); } $this->helper->title()->append($page->getMeta_title()); $this->helper->meta()->set('description', $page->getMeta_description()); $this->helper->meta()->set('keywords', $page->getMeta_keywords()); $this->view->page = $page; $this->helper->menu->setActive('contacts'); }
public function indexAction() { $this->view->bodyClass = 'home'; $page = Page::findCachedBySlug('index'); if (!$page) { throw new Exception("Page 'index' not found"); } $this->helper->title()->append($page->getMeta_title()); $this->helper->meta()->set('description', $page->getMeta_description()); $this->helper->meta()->set('keywords', $page->getMeta_keywords()); $this->view->page = $page; $this->helper->menu->setActive('index'); }
public function indexAction() { $slug = $this->dispatcher->getParam('slug', 'string'); $page = Page::findCachedBySlug($slug); if (!$page) { throw new Exception("Page '{$slug}.html' not found"); return; } $this->helper->title()->append($page->getMeta_title()); $this->helper->meta()->set('description', $page->getMeta_description()); $this->helper->meta()->set('keywords', $page->getMeta_keywords()); $this->view->page = $page; }