The Zurich release has arrived! Interested in new features and functionalities? Click here for more

how to show banner on portal on login from widget and provide close option for current session

Jayant Pandit
Giga Expert

My requirement is:

 

I want to show banner on CSM Portal which will be shown if webservice API returns true.

and If user dismiss this banner, it should be closed. 

 

I tried stock header widget and added my code there.

 

Code is getting executed every time I navigate on portal, and I wanted it should not get executed if user dismiss banner for the current session.

 

Any help on this will be appreciated.

1 REPLY 1

Peter Bodelier
Giga Sage

Hi @Jayant Pandit,

 

Create a user preference in which you save when someone dismissed it. Clear the user preference when a user logs in, so that it can show the banner.

In your widget check the preference to decide if it needs to be shown.


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.