Is it possible in CakePHP to have URL aliases in routes.php? Or by what other means can achieve something equivalent:
Lets assume I have some paginated views. Among the possible orderings there are particular ones I want to bind to a simple URL. E.g.:
- http://example.com/headlines => http://example.com/posts/listView/page:1/sort:Post.created/direction:desc
- http://example.com/hottopics => http://example.com/posts/listView/page:1/sort:Post.view_count/direction:desc etc.
How do I add parameters to a Router::connect()? Pseudo code:
Router::connect('/'.__('headlines',true), array( 'controller' => 'posts', 'action' => 'listView' 'params' => 'page:1/sort:Post.created/direction:desc', ) );