Hello,
I have a initRoute function in bootstrap file:
protected function _initRoutes()
{
$this->bootstrap('frontController');
$frontController = $this->getResource('frontController');
$router = $frontController->getRouter();// Get Router
//USER ACTIVATE
$route = new Zend_Controller_Router_Route(
'user/activate/:code',
array('module' => 'default', 'controller' => 'user', 'action'=>
'activate')
);
$router->addRoute('activateUser', $route);
}
I form activation links as below and it works great:
$this->url(array('code' => $this->activation->activationCode),
'activateUser');
However, when I browse http://domainname/user/activate/j3j4h4h,
all of my urls I form with $this->url(), show the activation link.
I form a link as below:
<?php echo $this->url(array('module'=>'admin', 'controller'=>'user',
'action'=>'list'));?>
But this link displays in href:
http://domainname/user/activate/j3j4h4h instead of
http://domainname/admin/user/list if the activation link is browsed on
the browser.
Hope I made it clear.
If i change my normal links to
<?php echo $this->url(array('module'=>'admin', 'controller'=>'user',
'action'=>'list'), 'default');?>
then they show correctly even in the activation link page. However,
now I have to add 'default' param to all of the links sitewide I
generate with
this->url.
Is there a trick/tip or idea that i can solve this problem a bit more easily?
Hope I made it clear.
thanks in advance