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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:18:16+00:00 2026-06-12T14:18:16+00:00

Ok, so I am using Zend Framework 1.12 with Doctrine 2.2.3. The Zend_Navigation class

  • 0

Ok, so I am using Zend Framework 1.12 with Doctrine 2.2.3. The Zend_Navigation class is too simple and static for my liking, so I am implementing my own navigation class.

The scenario is as follows:

My application requires the navigation menu to be made of standard (compulsory) items (such as “Home”, “About Us” and others) as well as user specific items (depending on user role). The dynamic menu items are stored in a database (MySQL) and I use Doctrine as my ORM and DBAL.

I’m attempting to write my own navigation class and partial view to render its contents, and in doing so, would like to know what performance issues I will have, if I query the db on every action call, then send the menu items back to the page? What would the best way to implement caching be? I have started using Zend_Registry_Namespace to store my menu classes (the class also stores the current active menu item, which I use in my partial view to append CSS styling to the item).

Please help

  • 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-06-12T14:18:17+00:00Added an answer on June 12, 2026 at 2:18 pm

    So, you’re not developing a CMS where users can create their own menu structures and contents. In that case you should not store the menu information in the relational database at all. Querying data from a database always involves a lot of overhead compared to just reading the same information from a PHP array or a config file. You don’t need to store anything in sessions either. I fact, it is really a simple case. Let the user log in, determine the user group/privileges of the user and programmatically piece together the menu.

    You can prepare the different menu parts beforehand and then just merge the arrays and send the final array to the nav renderer.

    Example:

    Standard menu that everybody gets:

    $navArray = array(
        array(
            'controller' => 'index',
            'label' => 'Home',
        ),
        array(
            'controller' => 'about',
            'label' => 'About',
    
        )
    );
    

    Then add entries depending on ACL roles:

    if ($user->getRole() == 'administrator')
    {
        $navArray[] = array(
            'controller' => 'tools',
            'label' => 'Tools'
        );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Doctrine with Zend Framework. For my model, I'm using a base class,
I've been working with Zend Framework (using Doctrine as the ORM) for quite a
I have a Zend Framework project using version 1.10.8 with Doctrine 1.2.4.I use Zend_Auth
When creating an association using Doctrine 2 and the Zend Framework, if the associated
I'm using Zend Framework with Doctrine. I'm creating an object, editing, then saving it.
I'm currently developing a Zend Framework project, using Doctrine as ORM. I ran into
I am using Doctrine 1.2 under the Zend framework to run my database queries.
I'm using Doctrine 2 in a Zend Framework application and require functionality similar to
Zend Framework 2 + Doctrine 2 Refering to this question, I have a simple
I'm currently building a web application using Zend framework 1.11.11 and Doctrine 2.2. I

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.