Rendering Active Branch of Zend Navigation Without Top Level

后端 未结 3 827
刺人心
刺人心 2021-01-15 12:50

I am rendering the top-level elements of a Zend Navigation object in one place like this:

echo $this->navigation()->menu()->setMaxDepth(0);
<         


        
3条回答
  •  伪装坚强ぢ
    2021-01-15 13:33

    If I got your question right, this is how I do it:

    print $this->navigation()->menu()->renderMenu(null, array(
        'minDepth' => 1,
        'maxDepth' => 1,
        'onlyActiveBranch' => true,
        'renderParents' => false));
    

    Renders only the submenu of currently active menu.

提交回复
热议问题