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

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.

Reply via email to