Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Understanding Widgets

Understanding Widgets

Widgets are what define the content in your portal. You can use the base system widgets provided with Service Portal, clone and modify widgets, or develop custom widgets to fit your own needs.

Out of box widgets are read-only so you can benefit from future updates, which means you can't update their code. If you need to make major changes, clone the widget and give it another name and ID.

Widget context menu

From any rendered Service Portal page you can CTRL+right-click a widget to see more configuration options in a context menu.

For example, navigate to Service Portal > Service Portal Home to open a sample portal page. CTRL+right-click Knowledge Base on that page.

Figure 1. Widget context menu
Icon Link widget context menu
Note: You must have the admin or sp_admin role to see the widget context menu. When you impersonate a user without one of those roles, you can still see the menu. However, a regular user signed in without those roles cannot see the menu.
Table 1. Widget context menu options
Option Description
Widget performance How long it takes for a widget to load
Instance options Specify an instance of a widget. Widgets instance options vary depending on the widget you select. For example, the instance options for the cool clock widget include different time zones for each instance, so you can have the same clock four times on a page, but with all different time zones.
Instance in Page Editor Opens that instance of the widget in the Page Editor
Page Designer Opens the widget in the Service Portal Designer, which lets you add containers, columns, and widgets. You can add styling from the Service Portal Designer to your specific widget or to the page the widget lives on.
Edit Container Background Make changes to the layout in which the widget is located.
Widget Options Schema Define the actual options you can select for an instance of a widget. For more information on configuring your own instance options, see Widget option schema.
Widget in Form Modal Opens the widget form in a pop up window so you can make quick changes to the widget.
Widget in Editor Opens the widget in the Widget Editor. You can use the Widget Editor to configure HTML templates, CSS, client scripts, service scripts, and demo data for the widget.
Log to console: $scope.data The $scope.data object passes data from the server to the client side controller. Instead of adding console.log messages or alerts into the controller code, you can just log the $scope.data object to the browser console and view the data there.
Log to console: $scope Similar to the $scope.data object, except it logs everything in $scope to the console.