I am using Zend Framework 1.12.
I wanted to add some routers. There are users and administrators in my system, and I have added a router for administrator viewing user's page.
I added
// meant to create the usage "xxx.com/userview/someusername"
$route = new Zend_Controller_Router_Route(
'userview/:username',
array('controller' => 'user',
'action' => 'viewone',
'username' => 'someusernamedefault')
);
$router = $frontController->getRouter();
$router->addRoute('userview', $route);
to my Bootstrap.php file.
I had some links in my sidebar, which contains links to actions (of another controller). I had added their link in a .phtml file as
echo $this->url(array('controller'=>'somecontroller', 'action'=>'someaction' ), null, true);
This sidebar contains lots of this links, which are from multiple controllers.
These worked fine till I added the route. After I added new route to Bootstrap (and added new action (viewall) to that controller (user) which is pointed from rooter, that works fine (I can use as "xxx.com/userview/someusername ). But my other links in the sidebar all becomes "xxx.com/userview". They all lose their values of controller and action...
What am I doing wrong?? Should I define my url's better, or my router better?
Thanks in advance.