Skip to Content
Author's profile photo Former Member

[WCEM20]How to add new Menu Item and View for existing Menu.

Prerequisists:

1. Custom WCB is created.

2. Custom  Main is created

Steps:

Check-out the DCs – module: main and with parts: ui, md from  the track: SAP-WCE

Create a new custom  extension for main with namespace:customer.

In UI Part of Customer Namespace, you need to change the following:

In customer/main/ui:

                    Add menu name you want to add here in menuConfig.xml

 


<MenuConfiguration xmlns:wec="com.sap.wec.core.config">
<Menu name="contactus" navigation="toContactUs" order = "4000" description="main.ui.header.contactus.menu" />
<MenuMapping moduleMenuName="main:highlightContactUs" menuName= "contactus"/>
</MenuConfiguration>

ui-repository.xml

               Add the following to your customer/main/ui ->ui-repository.xml


<UIRepository xmlns="http://www.sap.com/wec/frw/tc/ui/runtime/ui-repository"
 module="main">
 <Page defaultLayout="1column" name="contactUsPage" contentArea="contentContactUs"
  extends="basePage" ownLayoutUsed="true" menu="highlightContactUs">
  <Layout name="1column" />
  <Area defaultInclude="contactUs" name="contentContactUs" />
 </Page>

 <UIInclude name="contactUs" />
<NavigationTarget name="toContactUs"  targetComposition="Page:contactUsPage" />
</UIRepository>

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.