[ 'title' => '404', 'view' => 'page/404' ] ]; /** * get single page from slug * * * @param string $slug */ public function getAction($slug = NULL) { $repository = Manager::get('Page'); $page = $repository->findOneBySlug($slug); if (count($page['data']) === 0) { $this->app->redirect('/404', 301); } else { $this->render($page); } } /** * if page not found * */ public function notFoundAction() { $this->render($this->page404); } }