
Untitled
By: a guest on
Aug 12th, 2012 | syntax:
None | size: 0.64 KB | hits: 11 | expires: Never
<?php
Router::connect('/', array('controller' => 'pages', 'action' => 'view', array('slug'=>'home')));
/**
* ...and connect the rest of 'Pages' controller's urls.
*/
/**
* Grab the controller functions
*/
Router::connect('/:controller/', array('action' => 'view'));
Router::connect('/:controller/*', array('action' => 'view'));
/**
* Capture all other slugs
*/
Router::connect('/:slug', array('controller' => 'pages', 'action' => 'view'), array('slug' => '[a-zA-Z0-9_-]+'));
/**
* Admin routing for all admin related tasks
*/
Router::connect('/admin', array('controller' => 'pages', 'action' => 'index', 'admin' => true));