I'm looking for some help with reverse routing as the documentation is a
bit thin. Particularly for use with rendering objects such as
PaginatorHelper.
I have a URL in the format - /state/city/page/slug which I route with -
Router::connect('/:state/:city/:page/*', array(
'controller' => 'pages', 'action' => 'display', 'level' => 'town'), array(
'state' => '[a-z][a-z]', 'city' => '[a-z]+', 'page' => '[^/]*', 'pass' =>
array('page')));
That works fine in the forward direction, but how do I get the
PaginatorHelper to assemble the URL with the state and city pieces?
If I add another route for ajax requests, such as -
Router::connect('/ajax/:controller/:action/*');
That also works in the forward direction, but the URL generated by
PaginatorHelper in the previous case now generates the URL in the form -
/ajax/pages/display/...
So How do you tell the reverse routing which rule to use?
If I need to resort to a custom router, how do you tell the the Cake
rendering functions to use the custom router?
Thanks in advance
Mark
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.