<small id='VRTaF'></small><noframes id='VRTaF'>

        <bdo id='VRTaF'></bdo><ul id='VRTaF'></ul>
        <legend id='VRTaF'><style id='VRTaF'><dir id='VRTaF'><q id='VRTaF'></q></dir></style></legend>

      1. <tfoot id='VRTaF'></tfoot>
      2. <i id='VRTaF'><tr id='VRTaF'><dt id='VRTaF'><q id='VRTaF'><span id='VRTaF'><b id='VRTaF'><form id='VRTaF'><ins id='VRTaF'></ins><ul id='VRTaF'></ul><sub id='VRTaF'></sub></form><legend id='VRTaF'></legend><bdo id='VRTaF'><pre id='VRTaF'><center id='VRTaF'></center></pre></bdo></b><th id='VRTaF'></th></span></q></dt></tr></i><div id='VRTaF'><tfoot id='VRTaF'></tfoot><dl id='VRTaF'><fieldset id='VRTaF'></fieldset></dl></div>
      3. Zend Framework - 多板导航块

        时间:2023-05-31

            <tfoot id='JHpj7'></tfoot>

                  <tbody id='JHpj7'></tbody>

                <small id='JHpj7'></small><noframes id='JHpj7'>

                  <bdo id='JHpj7'></bdo><ul id='JHpj7'></ul>
                  <i id='JHpj7'><tr id='JHpj7'><dt id='JHpj7'><q id='JHpj7'><span id='JHpj7'><b id='JHpj7'><form id='JHpj7'><ins id='JHpj7'></ins><ul id='JHpj7'></ul><sub id='JHpj7'></sub></form><legend id='JHpj7'></legend><bdo id='JHpj7'><pre id='JHpj7'><center id='JHpj7'></center></pre></bdo></b><th id='JHpj7'></th></span></q></dt></tr></i><div id='JHpj7'><tfoot id='JHpj7'></tfoot><dl id='JHpj7'><fieldset id='JHpj7'></fieldset></dl></div>
                • <legend id='JHpj7'><style id='JHpj7'><dir id='JHpj7'><q id='JHpj7'></q></dir></style></legend>
                • 本文介绍了Zend Framework - 多板导航块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想使用导航助手通过 Acl 构建我的导航菜单.我的 Acl 部分工作正常.

                  I want to use the navigation helper to build my navigation menus using Acl. The Acl part I have working fine.

                  我现在希望能够显示几种不同类型的导航.例如.admin-nav、side-nav、new-nav 等.我在文档中找不到任何关于此的信息.只有如何设置导航,然后在布局或视图中重复使用该导航对象.

                  I now want to be able to display a few different types of navigation. E.g. admin-nav, side-nav, new-nav, etc. I cannot find anything about this in the docs. Only how to set the navigation and then use that one navigation object repeatedly within a layout or view.

                  我尝试了类似的方法 - 有两个不同的容器,具有不同的页面数组,然后在注册表中设置这些容器.然后从我的视图和/或布局中调用导航并将其传递给一个容器:

                  I tried something similar to this - having two different containers, with different arrays of pages, then setting these containers in the registry. Then from within my view and/or layout calling navigation and passing it a container:

                  <?php echo $this->navigation(Zend_Registry::get("news-nav")) ?>
                  

                  上面在我的新闻视图中调用,下面在我的布局中调用

                  The above is called in my news view, the following is called in my layout

                  <?php echo $this->navigation(Zend_Registry::get("admin-nav")) ?>
                  

                  这适用于我的所有页面,除了新闻页面.在我的新闻页面上,新闻导航显示两次,一次在布局中,一次在新闻视图中.管理导航从不显示,似乎被新闻导航覆盖.

                  This works fine for all my pages, apart from the news page. On my news page the nav for news is displayed twice, once in the layout and once in the news view. The admin nav is never displayed and seems to be overwritten by the news nav.

                  我可能会以完全错误的方式解决这个问题,如果是这样,请告诉我更好的方法.如果这个方法看起来不错,有人能帮我弄清楚为什么在布局和新闻视图中显示新闻导航.

                  I could be going about this completely the wrong way, if so please let me know a better way. If this method seems fine, can someone help me sort out why the news nav is being displayed in the layout and in the news view.

                  感谢您的时间

                  杰克

                  推荐答案

                  我遇到了完全相同的问题.我只是在我的控制器中为我需要的每个菜单创建多个 Zend_Navigation_Container 实例,将它们传递给视图,然后通过将对象直接传递给菜单渲染方法来渲染它们.如下:

                  I have had this exact same issue. I just create multiple instances of Zend_Navigation_Container in my controllers for each of the menus I need, pass them to the view and then render them by passing the objects directly to the menu render method. As follows:

                  在控制器中:

                  $this->view->menu1 = new Zend_Navigation_Container();
                  $this->view->menu2 = new Zend_Navigation_Container();
                  

                  在视图中:

                  $this->navigation()->menu()->renderMenu($this->menu1);
                  $this->navigation()->menu()->renderMenu($this->menu2);
                  

                  您甚至可以自定义每一个(通过在初始 menu() 调用后插入方法调用:

                  You could even customise each one (by inserting method calls after the initial menu() call:

                  $this->navigation()->menu()->setUlClass('my_first_menu')->renderMenu($this->menu1);
                  $this->navigation()->menu()->setUlClass('my_second_menu')->renderMenu($this->menu2);
                  

                  这篇关于Zend Framework - 多板导航块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:将 Zend Framework 用于高负载项目 下一篇:检查当前日期是否在两个日期之间 + mysql select 查询

                  相关文章

                • <tfoot id='j9bmi'></tfoot>
                • <small id='j9bmi'></small><noframes id='j9bmi'>

                    <i id='j9bmi'><tr id='j9bmi'><dt id='j9bmi'><q id='j9bmi'><span id='j9bmi'><b id='j9bmi'><form id='j9bmi'><ins id='j9bmi'></ins><ul id='j9bmi'></ul><sub id='j9bmi'></sub></form><legend id='j9bmi'></legend><bdo id='j9bmi'><pre id='j9bmi'><center id='j9bmi'></center></pre></bdo></b><th id='j9bmi'></th></span></q></dt></tr></i><div id='j9bmi'><tfoot id='j9bmi'></tfoot><dl id='j9bmi'><fieldset id='j9bmi'></fieldset></dl></div>

                      <bdo id='j9bmi'></bdo><ul id='j9bmi'></ul>
                  1. <legend id='j9bmi'><style id='j9bmi'><dir id='j9bmi'><q id='j9bmi'></q></dir></style></legend>