Thanks for the anwser but that didn't work here.
The be more clear: If I do not use named params, the the url is
correct: It has the prefix /owner
If I do use named params, the router adds owner:1 as a named param
instead of prepending the /owner prefix.
So:
Router::url(array("controller"=>"invoices", "action"=>"edit", 5,
"owner"=>true, "key"=>"val"));
Returns and not expected:
"/invoices/edit/5/owner:1/key:val"
I would expect:
"/owner/invoices/edit/5/key:val"
On 11 dec, 16:31, Lane <[email protected]> wrote:
> What were you expecting the Router to return if not "/invoices/edit/5/
> owner:1/key:val"?
>
> On Dec 11, 4:39 am, Marcelius <[email protected]> wrote:
>
> > Hello!
>
> > I have this route like the manual says for prefix routing:
>
> > Router::connect('/owner/:controller/:action/*', array
> > ('prefix'=>'owner', 'owner'=>true));
>
> > This works fine until I want to create a url with some named params in
> > it:
>
> > Router::url(array("controller"=>"invoices", "action"=>"edit", 5,
> > "owner"=>true));
> > returns "/owner/invoices/edit/5" as expected.
>
> > Router::url(array("controller"=>"invoices", "action"=>"edit", 5,
> > "owner"=>true, "key"=>"val"));
> > returns "/invoices/edit/5/owner:1/key:val" not as expected.
>
> > Something wrong in my routes? Please note that that's the only route
> > available.
>
> > Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---