Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 539299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:07:17+00:00 2026-05-13T10:07:17+00:00

I want to use the navigation helper to build my navigation menus using Acl.

  • 0

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

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.

Thanks for your time

Jake

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:07:18+00:00Added an answer on May 13, 2026 at 10:07 am

    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:

    In the controller:

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

    In the view:

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

    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);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a vertical navigation that I want to use similar to a TabBarController
I have the following in .screenrc # I want to use Vim's navigation keys
I want to use css3 & google web fonts for the navigation (instead of
i want use some data from a website with web service. i have a
I have a transaction log file in CSV format that I want use to
I have a easy select tag: <select> <option></option> <option></option> </select> Then I want use
I'm using tabnav plugin for Rails and I want to use rpsec to make
I have an ASP.Net MVC page where I want to use AJAX to update
Hi everyone i want build a poem application so i want use to NavigationControlle
I want to use/call a method inside EdumateSuperClass that I created in Navigation class.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.