开发者

ZF: wrong links when using routing in bootstrap

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜