Sunday, May 30, 2010

Openbiz Cubi Menu

Cubi Menu is the core component that manages the application navigation.

Normally, a web application (or web site) hand code several navigation elements, such as menus, tabs, breadcrumb and so on. This was the way used in previous Openbiz application - manually add left menu items on each view or template.

Let's talk how the new menu system works in Openbiz Cubi.
1. Definition of menu
  • Menu is a tree structure
  • Each menu item include navigation attributes like name, title, url, icon...
2. Menu presentation on web page
Menu is tree structure. It can be presented as application tab, breadcrumb, navigation menu, sitemap on a web page.

The diagram below shows how the menu tree maps to UI elements.

3. How to add menu in your own module
Each module can add entries in Cubi menu. In module/mod.xml, there is a Menu section to add MenuItem. The key to append module menu to system menu is
  • In the top MenuItem element, set Parent="existing_menuitem". It will append this menu as a child of specified menuitem
  • Or leave the Parent="". It will tell this menu as a root first level menu item.

4. How to manage menu in the Cubi application
Once a module is loaded in the system, its menu is inserted as well. Then you can see the menu items appear on proper place like navigation menu or application tab.

If you are admin, you can manage menu items in "Menu Management" views. This will be cover in separate topic.

No comments:

Post a Comment