开发者

ZF: wrong links when using routing in bootstrap

开发者 https://www.devze.com 2023-04-03 11:54 出处:网络
The problem is when generating Zend_Navigation menu in the view all links have \"/projects/add/\" href.

The problem is when generating Zend_Navigation menu in the view all links have "/projects/add/" href. At the same time when "/projects/list/" is active all links are correct. The same if I deleted this route - all links are ok.

So, while "/projects/add/" href is active the problem is.

Part of code from bootstrap:

        $frontController = Zend_Controller_Front::getInstance();
        $router = $frontController->getRouter();

        $router->addRoutes(array(
          开发者_StackOverflow  'AddProject' => new Zend_Controller_Router_Route('/projects/add/:key', array('module' => 'default', 'controller' => 'projects', 'action' => 'add', 'key' => '')),
        ));


Answer I found here

I just added default at all menu items which hadn't before. This is it...))

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号