Question

I have being working with ofbiz for about one month so I m relative new.

My question: is there a way to change the ofbiz "main menu" and "sub menu" into a single UL, LI structure?

by default there is two < UL > tags one for the applications menu and one for the sub menu of the current application.

but my client wants to have this menu as a navigation tree, like the one that OpenERP implements, I already know how to do this with javascrip and css but I need the sub menus of each application (here is an screenshot http://screencast.com/t/YZcjWoKH ).

As far as I know there is no way that an application knows the content menu of another, but I can be wrong, any ideas with this would be appreciated.

Was it helpful?

Solution

I came out with my own solution...

  1. in the folder //framework/common/widget open CommonScreens.xml
  2. locate this comment (for me is line 180)

    <!--render appheader: both menu widget style and ftl template style menus are supported-->
    
  3. in that < section > you will comment this condition:

    <condition><not><if-empty field="appheaderTemplate"/></not></condition>
    
  4. and also comment this tag (this is the default menu)

    <html-template location="${appheaderTemplate}"/> 
    
  5. Now add this tag instead of the tag you commented in steap 4

    <html-template location="component://common/webcommon/menu.ftl"/> 
    
  6. Create a new file in //framework/common/webcommon with the name menu.ftl in this file you can write html code in the menu section.
  7. finally we need to get rid of the CommonAppBarMenu for that you need to open //framework/common/widget/CommonMenus.xml and there comment this code:

    <menu-item name="main" title="${uiLabelMap.CommonMain}">
        <condition><not><if-empty field="userLogin"/></not></condition>
        <link target="main"/>
    </menu-item>
    
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top