1 Vote Vote

PHP MVC general question

Posted by topdog 166 days ago Questions| menu php mvc All

I'm building a small MVC framewrok for a specific PHP application - using Doctrine as ORM. I'd like to know what it would be the best practice to manage the frontend Menu.

My application has 3 menus (horizontal menu, left menu, bottom/footer menu) that can be edited by the site Admin (the menu is stored in a Doctrine NestedSet).

Where should be located the code that calls and renders the Menu? Each controller should be able to call the creation of the menu, according to its requirements (say, for a controller the user do not want the left menu to be displayed).

Locating this function in the Menu Model would be inappropriate I guess...

Discuss Bury


Who Voted for this Question