findCachedBySlug() 공개 정적인 메소드

public static findCachedBySlug ( $slug )
예제 #1
0
 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');
 }
예제 #2
0
 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');
 }
예제 #3
0
 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;
 }