How to add widgets to the header menu in esc portal.

Bharat Singhi
Tera Contributor

I want to add a weather widget in the header of the Employee Center portal. But in the menu options there isn't any OOB way to add widgets in the portal header.
Can anyone help regarding this?

4 REPLIES 4

jaheerhattiwale
Mega Sage
Mega Sage

@Bharat Singhi In the menu option add the page and to that page add your widget.

 

jaheerhattiwale_0-1672652427101.png

 

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

Thanks @jaheerhattiwale for your reply!

I want to show the weather and location of the logged in user in the header menu and not redirect them to a different page to see that so this solution won't be helpful in my case.

@Bharat Singhi Ok Got it.

 

Go to "Service Portal > Portals"

Open your portal record

jaheerhattiwale_0-1672652888934.png

 

Open main menu record

In the "Main menu" record there is a widget added

jaheerhattiwale_1-1672652936663.png

 

Open that widget, if you need the change for all the portals using this menu then update the same widget (if its editable) or clone widget and add it to the main menu record.

Add the following code to widget HTML side as shown in image below

<div>
    <widget id="YOUR WIDGET ID HERE"></widget>
</div>

<div>
      LOCATION INFO HERE
</div>

 

jaheerhattiwale_2-1672653333025.png

 

 

 

Please mark as correct answer if this solves your issue.

 

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

@Bharat Singhi Did you try this?

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023