@Cricket - Thats how its done in 1.3.
@Signified - Everything you said is correct and should happen, I use
it all the time. Im actually quite lost as why thats not working, it
looks correct. Try this:
Router::connect('/login/*', array('controller' => 'users', 'action' =>
'login'));
On Apr 9, 4:23 am, cricket <[email protected]> wrote:
> On Apr 8, 8:39 pm, Signified <[email protected]> wrote:
>
>
>
> > If I create this route:
>
> > Router::connect('/login', array('controller' => 'users', 'action' =>
> > 'login'));
>
> > Then I use the HtmlHelper to create a hyperlink in a view like this:
>
> > echo $this->Html->link('Login', array('controller' => 'users',
> > 'action' => 'login'));
>
> > I would expect to get this:
>
> > <a href="/login">Login</a>
>
> > But instead, I get this:
>
> > <a href="/users/login">Login</a>
>
> > Shouldn't the HtmlHelper honour routes?
>
> > If it did, I could change the route to be this (for whatever reason):
>
> > Router::connect('/sign-in', array('controller' => 'users', 'action' =>
> > 'login'));
>
> > And all my links would update automagically.
>
> > Any thoughts???
>
> That's correct. The only thing I see that's different from how I do it
> is that I use $html->link(...). I just tried it with $this->Html-
>
> >link(...) and got a fatal error. Where do you have this code?
>
> What version are you using?
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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
To unsubscribe, reply using "remove me" as the subject.