ZF: Url View Helper Acting Strangely
- by moteutsch
I have the following route defined:
$route = new Zend_Controller_Router_Route(
'users/:id',
array(
'controller' => 'users',
'action' => 'profile',
'id' => ''
)
);
When I am on the page via the shortened URL (localhost/users/someuser), the URLs defined in the layout file all link to "localhost/users". Here is the code in the layout:
<li><a href="<?php echo $this->url(array('controller' => 'index'), null, true); ?>">Home</a></li>
<li><a href="<?php echo $this->url(array('controller' => 'search'), null, true); ?>">Search</a></li>
<!-- etc. -->
How can I fix the code so that the links in the layout file point to the correct URLs?