Hari
Hari

Reputation: 297

Change icon in Header Navigation menu - SAPUI5

I need to change icon in the header Navigation Menu. I would like to customize the icon for "Master Data Display".

enter image description here

Upvotes: 1

Views: 907

Answers (1)

Igwe Kalu
Igwe Kalu

Reputation: 14868

The items in the navigation menu, including the icons can be managed with the ShellUIService.

To change the icon you must call setHierarchy( aHierarchyLevels ) with the list of items that should be shown in the menu.

aHierarchyLevels is structured as follows:

[
    {
        title: "Main View",
        icon: "sap-icon://documents",
        intent: "#Action-sameApp"
    },
    {
        title: "View 2",
        subtitle: "Application view number 2",
        intent: "#Action-sameApp&/View2/"
    },
    {
        title: "View 3",
        subtitle: "Application view number 3",
        intent: "#Action-sameApp&/View3/"
    }
]

Upvotes: 1

Related Questions