- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 09:18 AM
Hi all,
I created an announcement banner and widget on one of my portals, however the functionality with limiting the announcement banner to display only on one of the pages of my portal seems to be lacking. Was anyone able to find a way to display the banner on only one page in a portal? (For now i just added the widget to the one page and not others but this does not seem as clean as the banner
Widget:
Banner:
)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 09:40 AM
Hi there,
In ServiceNow, there is no out-of-the-box feature to limit an announcement banner widget to display only on one specific page of a portal. By default, widgets are meant to be added to a portal globally, meaning they will appear on all pages within that portal.
However, there you can try below workaround -
Create a custom widget that displays the announcement banner and includes a condition in the widget's client-side JavaScript to check the current page URL. If the current page matches the specific page where you want the banner to appear, then display the banner; otherwise, hide it.
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 09:40 AM - edited 07-26-2023 09:41 AM
Hi there,
"the functionality with limiting the announcement banner to display only on one of the pages of my portal seems to be lacking"
Which functionality do you mean here? I don't believe there is such, so can you please clarify.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 09:40 AM
Hi there,
In ServiceNow, there is no out-of-the-box feature to limit an announcement banner widget to display only on one specific page of a portal. By default, widgets are meant to be added to a portal globally, meaning they will appear on all pages within that portal.
However, there you can try below workaround -
Create a custom widget that displays the announcement banner and includes a condition in the widget's client-side JavaScript to check the current page URL. If the current page matches the specific page where you want the banner to appear, then display the banner; otherwise, hide it.
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 10:58 AM
Thank you very helpful answer, and seems like its exactly what i thought the case would be. No OOB way to do it but perhaps customizing it could do the job - Juice is most likely not worth the squeeze. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 10:09 AM
I'm a little confused as you seem to have the perfect solution: running a widget on the specific page.
Why would you want to have the widget in the banner, run for every page and figure out if it should actually display the announcement or not. Obviously I don't know your setup, but it would seem that the announcement would only appear on a small number of visits to the portal, so why have it do all the work for nothing most of the time?
You can certainly style the widget announcement to look more like the banner one.