Wednesday, March 21, 2012

Re: Router::Contect Trailing Star Syntax

There is a only 2.1 notice after the text that talked about that piece, but was not sure if that was mean for the piece or the piece after the notice.

On Wednesday, March 21, 2012 2:49:04 PM UTC-4, AD7six wrote:


On Wednesday, 21 March 2012 19:33:01 UTC+1, Jeremy wrote:
Router::connect('/lists/edit/**', array('controller'=>'lists', 'action' => 'edit'));

I was trying to use the above route to give me everything following the edit in 1 url slug instead of defining each part. Such as '/lists/edit/opt1/opt2/opt3' it would call edit('opt1/opt2/opt3'). Reason being is I could have different number of parts and want to remain flexible. In the 2.0 install it would on give me the first part so edit('opt1'). I was ported my code into a 2.1 install and it works fine now.

Ic yes, that syntax is 2.1+ only. If the docs don't label it as such please submit a correction.

AD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
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

No comments: