mickburkejnr
mickburkejnr

Reputation: 3690

Building a menu system in Symfony2, with static parent links but dynamic sub page links

In this project, I have a menu for the navigation for the website. Due to design constraints, these links are hard coded in the project. They won't be changed (at the request of the designer and the client).

However, they wish to have drop down menus with items that can be added or removed. I have had a quick look on Google, and I haven't come across a way to do this.

I did manage to make a crude dynamic menu system, but the performance overheads were way too high using this system.

Is there anything clever I could do to achieve this?

Cheers!

Upvotes: 0

Views: 2858

Answers (1)

Problematic
Problematic

Reputation: 17678

If you're not pigeonholed into a self-built system (it doesn't sound like you are, since you're using a framework), have a look at the KnpMenuBundle. It's quite flexible, and depending on what you mean by "items that can be added or removed", you could combine it with a simple CRUD interface for a MenuItem system to let authorized users change the submenus.

Upvotes: 4

Related Questions