SubMenu under Menu on web_menu.xml

I want to create a submenu under menu. and under that submenu I want to have 2 browse screens.
But menu under menu is not allowed here.

<menu id="payment"
          icon="font-icon:MONEY"
          insertBefore="administration">
        <item screen="Deduction.browse"/>
    
        <menu description="setting" icon="font-icon:GEAR" insertBefore="payment">
            <item screen="NetworkShare.browse"/>
            <item screen="NetworkSplit.browse"/>
   </menu>
    </menu>

Hi,

Having sub-menu is absolutely valid case. The only problem I see is that you added insertBefore="payment" for sub-menu, but it’s impossible to insert sub-menu before its parent. Also, I’d recommend adding id for sub-menu.

Gleb

1 Like

Thankyou Gelb! It worked.
But I see different prob now.
Under payment ,my sub menu is payment settings. But I can see the caption is “menu.config:Payment Settings”

41

   <menu id="payment"
          icon="font-icon:MONEY"
          insertBefore="administration">
        <item screen="payment_screen"/>
        <item screen="zeusv2$Deduction.browse"/>
        <item screen="zeusv2$Clarification.browse"/>
        <item screen="zeusv2$PublisherClarification.browse"/>
        <menu id="paymentSetting">
            <item screen="zeusv2_NetworkShare.browse" />
            <item screen="zeusv2_NetworkSplit.browse" />
        </menu>
    </menu>

Hi Joshi,

you have to add the name for your sub-menu into the Main Message Pack (…/web/messages.properties)

menu-config.paymentSettings = Payment Settings
(where paymentSettings is the id of your created sub-menu)

Regards,
Steven

2 Likes

Thankyou very much Steven!!