I can’t figure this out. How do you use the url helper with custom routes?
I have a method in my users controller called edit and I have a custom route for it so it can be called through domain.com/settings (instead of domain.com/users/edit)
When I use the url helper this way:
<li><a href="<?php echo $this->url(array('controller' => '', 'action' => 'settings')); ?>">Settings</a></li>
it works fine from the main page, but once I het on the settings page, every other link generated by the url helper links to the current url (domain.com/settings)
Any ideas how to fix this?
The solution is to add a name to your custom route.
When you go to use it on the frontend, add your route name:
a