public function publicationAction() { $slug = $this->dispatcher->getParam('slug', 'string'); $type = $this->dispatcher->getParam('type', 'string'); $publication = Publication::findCachedBySlug($slug); if (!$publication) { throw new Exception("Publication '{$slug}.html' not found"); } if ($publication->getTypeSlug() != $type) { throw new Exception("Publication type <> {$type}"); } $this->helper->title()->append($publication->getMeta_title()); $this->helper->meta()->set('description', $publication->getMeta_description()); $this->helper->meta()->set('keywords', $publication->getMeta_keywords()); $this->view->publication = $publication; $this->helper->menu->setActive($type); }