I used the Zend framework for a while, but I have a problem that I cannot solve on my own. I am using Zend_Layout, Zend_View and the URL viewing helper to create hyperlinks. To create an SEO oriented URL, I use the following code in my layout.phtml:
<?php echo $this->url( array( 'module' => 'default', 'controller' => 'contact' ), 'contact', true ); ?>
It works great. The link is contact.html (this is covered in my bootstrap). But when I try to access another page that is not routed (backend pages do not need an SEO URL) after visiting the contact page, Zend automatically uses the current route. To make things clearer, the code I'm using to create a link to the backend page in my layout.phtml is:
<?php echo $this->url( array( 'module' => 'admin', 'controller' => 'manage' ), null, true ); ?>
The second parameter, null, is used to tell the helper that the route is not used for this link. But it seems that Zend automatically uses the current route (contact route). How to solve this problem?
Thanks in advance!
source
share