Here I present you a menu generator for Zend applications. The key feature is the integration with ACL rules.
It is composed of three files :
-
menu.ini, contain menu description;
-
showMenu.php, helper to display menu;
-
menu.css, CSS stylesheet.
Menu.ini
; Patient
patient.name = Patient
patient.controller = patient
patient.action = show-list
patient.sub.add.name = Register new
patient.sub.add.controller = patient
patient.sub.add.action = add
patient.sub.list.name = Manage patients
patient.sub.list.controller = patient
patient.sub.list.action = show-list
patient.sub.quittance.name = Register quittance
patient.sub.quittance.controller = quittance
patient.sub.quittance.action = add
; Test
test.name = Test
test.controller = test
test.action = show-list
test.sub.add.name = Register new
test.sub.add.controller = test
test.sub.add.action = add
test.sub.list.name = Manage tests
test.sub.list.controller = test
test.sub.list.action = show-list
ShowMenu.php
It is the helper. Download it.
menu.css
This is the css for a css only menu. It is included in the ShowMenu.zip file. I found it on a website, but I don't remember the name. Sorry.
I hope you will enjoy. You are free to modify this code. If you do, I will appreciate to know it.