【问题标题】:Change Apache OFBiz menu更改 Apache OFBiz 菜单
【发布时间】:2012-10-11 16:04:44
【问题描述】:

我已经在 ofbiz 工作了大约一个月,所以我是相对较新的人。

我的问题:有没有办法把ofbiz的“主菜单”和“子菜单”变成一个单一的UL、LI结构?

默认有两个

    标签,一个用于应用程序菜单,一个用于当前应用程序的子菜单。

    但我的客户希望将这个菜单作为导航树,就像 OpenERP 实现的那样,我已经知道如何使用 javascrip 和 css 做到这一点,但我需要每个应用程序的子菜单(这里是截图 @987654321 @)。

    据我所知,一个应用程序不可能知道另一个应用程序的内容菜单,但我可能是错的,对此的任何想法都将不胜感激。

【问题讨论】:

    标签: ofbiz


    【解决方案1】:

    我想出了自己的解决方案...

    1. 在文件夹中 //framework/common/widget 打开 CommonScreens.xml
    2. 找到这条评论(对我来说是第 180 行)

      <!--render appheader: both menu widget style and ftl template style menus are supported-->
      
    3. 在那个

      中你会评论这个条件:

      <condition><not><if-empty field="appheaderTemplate"/></not></condition>
      
    4. 并评论这个标签(这是默认菜单)

      <html-template location="${appheaderTemplate}"/> 
      
    5. 现在添加此标签,而不是您在第 4 步中评论的标签

      <html-template location="component://common/webcommon/menu.ftl"/> 
      
    6. 在 //framework/common/webcommon 中创建一个新文件,名称为 menu.ftl 在此文件中您可以在菜单部分编写 html 代码。
    7. 最后,我们需要摆脱 CommonAppBarMenu,因为您需要打开 //framework/common/widget/CommonMenus.xml 并注释此代码:

      <menu-item name="main" title="${uiLabelMap.CommonMain}">
          <condition><not><if-empty field="userLogin"/></not></condition>
          <link target="main"/>
      </menu-item>
      

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多