Hello,

I had some issue with multiple admin routes, links or paginator links were
incorrect or mixed up ...
this routes works for me now without :

routes.php
<?php
   ......
   ......

    $parts = explode('/',$_SERVER['REQUEST_URI']);
    $area = $parts[1];
    $areas = array("admin", "nurse", "practice");
    if (in_array($area,$areas)){
    Router::connect("/".$area."", array("controller"=>"page",
"prefix"=>$area, "action"=>"index", $area));
    Router::connect("/".$area."/:controller/:action", array("prefix"=>$area,
"".$area.""=>true));
    Router::connect("/".$area."/:controller/:action/*",
array("prefix"=>$area, "".$area.""=>true));
    Router::connect("/".$area."/:controller/:action/*",
array("prefix"=>$area));
    }
?>


Andras Kende

On Thu, Dec 11, 2008 at 6: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
-~----------~----~----~----~------~----~------~--~---

Reply via email to