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 6813437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:34:12+00:00 2026-05-26T20:34:12+00:00

I am currently building an application where I have multiple ways to access the

  • 0

I am currently building an application where I have multiple ways to access the same controller.

E.g.:

Presenters -> access controller user/index with param user_type : presenters
Attendees -> access controller user/index with param user_type : attendees

In my navigation .ini I have defined both paths (I removed the label, the module and ACL to ease the reading):

dashboard.pages.presenter.controller = "user"
dashboard.pages.presenter.action = "index"

dashboard.pages.presenter.pages.create.controller = "user"
dashboard.pages.presenter.pages.create.action = "create"

dashboard.pages.presenter.pages.edit.controller = "user"
dashboard.pages.presenter.pages.edit.action = "edit" 

dashboard.pages.attendee.controller = "user"
dashboard.pages.attendee.action = "index"

dashboard.pages.attendee.pages.create.controller = "user"
dashboard.pages.attendee.pages.create.action = "create"

dashboard.pages.attendee.pages.edit.controller = "user"
dashboard.pages.attendee.pages.edit.action = "edit"

The issue I am having is that when i go to the attendee section, the breadcrumb that is displayed is the one for the presenters. I understand that it work as intended, but I am looking for a way to set the right “node” active based on the URL param user_type.

Using this :

$page = $this->view->navigation()->findOneByLabel($label);
if ($page) {
    $page->setActive();
}

I have been able to set a page to active, but I am looking for a way to “reset” the Zend_Navigation state to none.

  • 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-26T20:34:13+00:00Added an answer on May 26, 2026 at 8:34 pm

    As long as I got you right put this in your Bootstrap and copy the controller plugin I wrote for you. I did not test yet what happens if no navigation was set to the view. Better test that. By the way having equal pages using different routes is not good in terms of seo.

    Bootstrap:

    protected function _initStackoverflow()
    {
        $this->bootstrap('frontController');
        $frontController = $this->getResource( 'frontController' );
        $frontController->registerPlugin( new Altergear_Controller_Plugin_Stackoverflow() );
    }
    

    Controller Plugin:

    <?php
    class Altergear_Controller_Plugin_Stackoverflow extends Zend_Controller_Plugin_Abstract
    {
        public function preDispatch( Zend_Controller_Request_Abstract $request )
        {
            if( ( $activeLabel = $this->_request->getUserParam('active') ) !== null ){
                $view = Zend_Controller_Front::getInstance()->getParam('bootstrap')->bootstrap('view')->getResource('view'); 
                foreach( $view->navigation()->getPages() as $page )
                {
                    $page->setActive(  strtolower( $page->getLabel() ) === strtolower( $activeLabel ) );
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently building an application that I will host and will have multi-tenants
I'm currently building a multiple-document interface application, but I'm having a problem when the
I have several classes in an application that I am currently building, and I
I'm currently building an application using Sencha Touch. We have a certain Carousel on
I am building an android application that reads text files. Now,i have multiple text
I currently building web management system using mvc3 In my application i have system
I'm currently building a quiz application for facebook, which would have a photo uploaded
I am currently building a small crm application. I need each user to be
I have an application that I'm currently building that requires me to display a
Greetings all: I currently am building a web application, and have been debating whether

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.