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