Monday, November 23, 2009

Re: Pagination and Reverse Routing

You must add one of the following at the begining of your router.php
configuration file in order to use the 'page' parameter in url and get your
url parsed by the router.

This comment come from the Router class itself:
* Do not parse any named parameters:
* {{{ Router::connectNamed(false); }}}
*
* Parse only default parameters used for CakePHP's pagination:
* {{{ Router::connectNamed(false, array('default' => true)); }}}
*
* Parse only the page parameter if its value is a number:
* {{{ Router::connectNamed(array('page' => '[\d]+'), array('default' =>
false, 'greedy' => false)); }}}
*
* Parse only the page parameter no mater what.
* {{{ Router::connectNamed(array('page'), array('default' => false,
'greedy' => false)); }}}
*
* Parse only the page parameter if the current action is 'index'.
* {{{ Router::connectNamed(array('page' => array('action' => 'index')),
array('default' => false, 'greedy' => false)); }}}
*
* Parse only the page parameter if the current action is 'index' and the
controller is 'pages'.
* {{{ Router::connectNamed(array('page' => array('action' => 'index',
'controller' => 'pages')), array('default' => false, 'greedy' => false));
}}}
*
--
View this message in context: http://old.nabble.com/Pagination-and-Reverse-Routing-tp20434224p26490040.html
Sent from the CakePHP mailing list archive at Nabble.com.

--

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en.

No comments: