menu.xml
This post refers to DotKernel 1, based on Zend Framework 1.
If you are looking for DotKernel 3 related posts, go here.
If you are looking for DotKernel 3 related posts, go here.
menu.xml is used to display the menu for each module. Each module has one menu file:
- configs/frontend/menu.xml
- configs/admin/menu.xml
menu.xml sample code:
- id tag is used to register the menu. To parse the menu that has id 1, you need to use {MENU_1} in your tpl file
- type – menu can have submenus (horizontal/vertical) or not (horizontal_simple / vertical_simple)
- display tag is used to show/hide the menu
There are a few options that can change the behavior of the menu link:
- target (_blank value will open a new tab, leave empty by default)
- external (if true then the final link will no longer have {SITE_URL}/ on the left side)
- isLogged (if true the link will only appear for a logged user)
- notLogged (if true the link will only appear if no user is logged in)
There is one exception in the menu behavior: if link tag has no value then the menu will act as a javascript button show/hide its submenu – the page won’t be refreshed.
Links should always have / (slash) at the end but not at the beginning.
Leave a Reply