I think you have to add prefix => false to the array 2nd param passed to
link - but it might be admin => false (I thnk its the former allowing the
admin.routing to be changed eg members or ewoks)

2008/10/9 MikeB <[EMAIL PROTECTED]>

>
> I have a users controller with 2 actions, view() and admin_add(). I've
> tried to create a link in the admin_add view that points the user to
> view(), however it keeps /admin/ in the url it generates. I'm using
> the link method in the Html helper and I don't understand how to
> prevent this.
>
> Here is some code:
> $html->link('View User',
>                array('controller'=>'users',
>                        'action'=>'view',
>                        'id' => $user['Users']['id'],
>                        'prefix' => false
>                )
> );
>
> This creates the url: /admin/users/view/1
> And I'm looking for just /users/view/1
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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