Issue
Overview
This article describes the News gadget on the Homepage and explains how to update the gadget title and conditions.
Description
A gadget is a Homepage item used to show the knowledge search field and notes, for example, pulling up information from knowledge table.
The gadget's title and conditions are defined in the sys_widget table in the Gadget record. To access the Gadget record:
-
Navigate to System UI > Widgets.
-
Open the widget record (https://<instance-name>.service-now.com/sys_widgets.do?sys_id=a066bb690a0a0aa300d40d0cce7ed94f).
The render_gadget_nets UI page defines what is displayed in the gadget/widget (https://<instance-name>.service-now.com/sys_ui_page.do?sys_id=225c69940a0a0b57008029aaea037e49).
Examples
This section describes how to make some typical changes to gadgets.
-
To change the title of the gadget that the user selects when adding content on the Homepage:
-
Navigate to System UI > Widgets.
-
Open the Gadget record (https://<instance-name>.service-now.com/sys_widgets.do?sys_id=a066bb690a0a0aa300d40d0cce7ed94f)
-
In line 4, change:
News' : { 'type' : 'news' },
to:
'NEWS TEST' : { 'type' : 'news' }, -
Add the widget again.
-
-
In the News gadget, to pull articles with Category= News not Topic=News:
-
Navigate to System UI > Widgets.
-
Open the Gadget record (https://<instance-name>.service-now.com/sys_widgets.do?sys_id=a066bb690a0a0aa300d40d0cce7ed94f)
-
In line 29, change:
return 'kb_knowledge_list.do?sysparm_query=topic=News';
to:
return 'kb_knowledge_list.do?sysparm_query=category=News';
-
Additional Information
-
Community discussion topic News scroll widget, the records which scroll is in blue color. how to make them in red? (requires login)
-
Product documentation topic Create a widget that displays a ServiceNow UI page