url routing - Zend framework, URL view helper and the layout -
i've been using zend framework time now, i'm facing problem can't solve myself. i'm using zend_layout, zend_view , url view helper create hyperlinks. create seo-friendly url's, use following code in layout.phtml:
<?php echo $this->url( array( 'module' => 'default', 'controller' => 'contact' ), 'contact', true ); ?>
this works fine. link contact.html (this dealt in bootstrap). when try access different page not routed (backend pages don't need have seo-url's) after visit contact page, zend automatically uses current route. make things clearer, code use create link backend page in layout.phtml:
<?php echo $this->url( array( 'module' => 'admin', 'controller' => 'manage' ), null, true ); ?>
the second parameter, null, used tell helper no route used link. seems zend automatically uses current route (the contact route). how solve problem?
thanks in advance!
use 'default'
route parameter. null
tells url view helper use current route not, thought, no route
Comments
Post a Comment