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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:18:19+00:00 2026-05-11T07:18:19+00:00

I want to display a menu on every page that is run from a

  • 0

I want to display a menu on every page that is run from a database. Using just down and dirty php thats easy but I want to integrate it with cakephp using their MVC system. Now my question is how is the best way to go about this?

My thoughts are to make an element with the layout and then a component or controller for all the logic. Any Suggestions on this? Or is a Helper what i want to use?

I also need to get all the data from multiple tables in the database. Is it best to do all my data collecting logic through one model? Or do most of it in the menu controller (or component) and use the models for each table?

Thank you,

Walter

  • 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. 2026-05-11T07:18:20+00:00Added an answer on May 11, 2026 at 7:18 am

    Models should fetch and process data from the table that they are modelising, so fetch menu data for each model in that model.

    Components are intended to house logic shared by multiple controllers, so a menu component that is used by all your controllers sounds like a good place to put the code to fetch the menu data from the models and mash it together.

    A menu is typically a nested list, if this is the case with your menu too, the easiest way to output the markup for this is a recursive function (a function that calls itself) which outputs one level at a time, so rather than an element, I’d just create a helper with a menu() method in there, and call that directly from the layout.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my app, I have a menu that I want to display for every
I want to display a menu that changes according to the user group of
I had datalist as menu that display categories and subs and I want to
I want display data from database in Listbox...Here is my code, It is not
I want to display a main menu on the left and a settings page
Say you want to display a menu that has many elements... Some elements are
I'm making a game and in the menu I want to display the text
I have a menu with button objects in As3. I want to display the
I did hidden eclipse main menu. I want to display all item of eclipse
when i hover on div#new-menu-lower ul.menuul li.menuli i want to add display block to

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.