protected function fillRoutes() { // define route for the custom page // $this->route( // 'customPage', // '/:controller/:action/', // array() // ); // define route for the front page $this->route('index', '/', array('controller' => 'CustomPage', 'action' => 'index')); // set handler for unrouted requests (a fallback route) $fallbackRoute = new Route($this->getDefaultDispatcher(), ParameterImportRule::multiple(array('controller' => 'CustomPage', 'action' => '404'))); $this->setFallbackRoute($fallbackRoute); }
protected function fillRoutes() { $this->route('feedback', '/feedback/', array('controller' => 'CustomPage', 'action' => 'feedback')); $this->route('search', '/search/', array('controller' => 'CustomPage', 'action' => 'search')); $this->route('adminEditAnnouncement', '/admin:controller/announcement/?id', array('action' => 'editAnnouncement')); $this->route('adminNewAnnouncement', '/admin:controller/announcement/', array('action' => 'newAnnouncement')); $this->route('adminEditRelease', '/admin:controller/release/?id', array('action' => 'editRelease')); $this->route('adminNewRelease', '/admin:controller/release/', array('action' => 'newRelease')); $this->route('adminReleases', '/admin:controller/releases/', array('action' => 'releases')); $this->route('adminLogin', '/admin:controller/', array('action' => 'login')); $this->route('news', '/news/', array('controller' => 'CustomPage', 'action' => 'newsList')); $this->route('index', '/', array('controller' => 'CustomPage', 'action' => 'index')); $fallbackRoute = new Route($this->getDefaultDispatcher(), ParameterImportRule::multiple(array('controller' => 'CustomPage', 'action' => '404'))); $this->setFallbackRoute($fallbackRoute); }