Content Management PDF
Content Management PDF
Content Management PDF
PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information.
PDF generated at: Sun, 28 Jun 2015 07:15:05 PST
If you have the admin role, use the following steps to activate the plugin.
1. Navigate to System Definition > Plugins.
2. Right-click the plugin name on the list and select Activate/Upgrade.
If the plugin depends on other plugins, these plugins are listed along with their activation status.
3. [Optional] If available, select the Load demo data check box.
Some plugins include demo datasample records that are designed to illustrate plugin features for common use cases. Loading demo data is
a good policy when you first activate the plugin on a development or test instance. You can load demo data after the plugin is activated by
repeating this process and selecting the check box.
4. Click Activate.
Example Sites
There are two common interface approaches within the ServiceNow community:
An image and text-based interface similar to Amazon.com
A search-based interface similar to Google
Both approaches have been used successfully. The approach you select depends on the needs of the people using the
data and how easy it is to train them. While the two design philosophies are different, both approaches share the
common goal of UI simplicity.
To view information about several websites created by Service-Now using the CMS, please see the following:
ServiceNow ESS portal
ServiceNow website
ServiceNow mobile website
A ServiceNow Customer
Example
Getting Started
To create a new site and add pages,
follow the step-by-step procedures.
To read a case study about creating
the ESS Portal sample site, see
ServiceNow ESS portal.
To read a case study about how the
ServiceNow website was built in
the CMS, see ServiceNow Website.
To read a case study about how the
ServiceNow mobile website was
built in the CMS, see ServiceNow
Mobile Website.
Search-based interface that feels familiar to anyone who has ever used Google.
Enhancements
Dublin
Administrators can now add content pages to an application.
Option
Description
Content Management
Sites
Lists sites created and the sample Service Management (SM) portal that is included in the base system. A site is a group of pages
with a consistent look and feel defined by a common layout and theme.
Pages
Lists pages created for all sites. Groups of pages are used to create sites.
Blocks
All
Lists all blocks, including their category and type. Use blocks to create reusable, defined pieces of content.
Headers
Lists all header blocks. Use header blocks to display items such as global search, navigational menus, and logos.
Navigation
Menus
Lists all navigation menu blocks. Use navigation menu blocks to define site-wide navigation. There are many different menu
options available.
Dynamic
Lists all dynamic blocks. Use dynamic blocks to create content. Requires knowledge of HTML and basic Jelly script (such as
writing macros and authoring dynamic content).
Lists
Lists all list blocks. Use list blocks to manage site navigation by generating items from data tables.
Static HTML
Lists all static HTML blocks. Use static HTML blocks to author web page content using a WYSIWYG (What You See Is What
You Get) editor and the HTML field. Users who are comfortable generating mark-up directly should use dynamic HTML blocks
rather than static HTML blocks.
Specialty Content
Flash Movies
Lists all Flash movie blocks added to the CMS. Use Flash movie blocks to embed any Flash movie (.swf file) in a content page.
Content Links
Lists all content links and their corresponding URLs. Use content links to generate lists from the content_links table.
IFrames
Lists all IFrames created in the CMS. Use iframes to place a ServiceNow form (or form from another source) on a page.
Design
Themes
Lists all themes available in the CMS and specifies which themes are active. Use themes, a collection of Cascading Style Sheets
(CSS) files, to define the look of pages.
Style Sheets
Lists all style sheets in the CMS and their type. Use style sheets, standard CSS, to define the look and feel of all elements.
Layouts
Lists all layouts. Use layouts to define where elements can be placed on a page.
Frames
Lists all frames. Use frames to manage designed containers for content blocks and other elements.
Images
Configuration
Page
Shows the settings for default login page, search page, layout, and theme. If settings are not specified at the site level, the defaults
selected here are applied.
Page Detail
Settings
Lists all configurable content blocks. Use configurable content blocks when trying to render multiple forms within the
ServiceNow instance.
Content Types
Lists the pages that display content from a table. Each content type corresponds to a table.
List Definitions
Lists the list definitions used to extend the summary template defaults that are defined on the site level.
Login Rules
Lists the rules that define what users see after they log in.
To set default CMS configuration options, navigate to Content Management > Configuration Page.
Field
Login page
Input Value
Specifies a content page to use as the login page (if a login page is not set at the site level). Include fields on the login page where
users can enter a user name and password to view the site.
Search page Specifies a content page for displaying search results (if a search results page is not set at the site level).
Default
layout
Specifies a default layout for content pages to use. For more information on layouts, see Defining a Layout.
Default
theme
Specifies a default theme for content pages to use. For more information on themes, see Theming Content Pages.
Gather the proper resources - ensures that the process is not delayed by a lack of resources.
Organize data within the instance - ensures that the instance has all of the data the CMS will present.
Organize the content - ensures that system content and CMS content is complete.
Leverage corporate style design guidelines - saves design time and guarantees that the CMS site conforms to the
corporate look and feel.
Use prototypes and rapid web design - ensures that the structure of the CMS site is clear and planned out, either
on paper or an electronic file.
Team Assignments
Once you have people or groups identified for the project, establish who will do what.
Determine ownership for each page.
Set a page update schedule so owners do not overwrite each other.
Formalize content management processes, including updating pages and content review.
Organize Content
A site created in CMS relies on two different types of content:
System information, such as knowledge base articles and catalog items
CMS site information, such as site pages, images, and menus
System Content
Organize the content so the interface is usable. The organizational process depends on what data is going to be
leveraged, both in the CMS (using sites, parent pages, pages, and navigational menus) and throughout the rest of the
system. For example, within the catalog you have "category" and in the knowledge base you have "topic" and
"category", which can be used with filtered lists for good results.
While staying organized within CMS is important for long-term maintenance of the site, most data probably lives in
other ServiceNow applications. Communicate with the people who administer the knowledge base, service catalog,
business service portfolio, and any other system data that will be accessible through pages you create using the CMS.
For example, the team that created the ServiceNow corporate website in CMS evaluated many of the naming
conventions used in the corporate knowledge base.
CMS Content
Start by listing all of the content you want to host on the CMS pages. Examples include Help pages, My Requests,
My Approvals, and specific catalog items. Think about current solutions to implement right away and ideas for the
future.
Within CMS, grouping allows you to define the top-down menu structure. There are several ways to group, such as
the Parent Page reference field. Group all content logically and find a common name.
In an IT environment, you can clearly define two main paths:
Content built for an end user:
common name: End User Page
Content built for an IT professional:
common name: IT Professional Page
Other, more general, groups could be:
Reports
Reporting Page
Help and knowledge
Knowledge page
Branding Elements
Branding is the names, terms, signs, colors and symbols that identify an organization. Your marketing department
probably has many branding elements they can share with you as you plan CMS pages. Consider incorporating the
following branding elements into the CMS pages you create:
Logos
Color palette
Tag line
Trademarked elements
Graphics
Site Design
While planning your website, consider providing a core set of features with a standard appearance throughout the
site. The following web design elements are often used to create a consistent look:
Page templates
Navigation schemes
Header
Breadcrumbs
Footer
Forms
ServiceNow
Analyze and organize the following ServiceNow features in your instance if you plan on using any of these features
with CMS pages:
Account settings
Email
Workflow Approvals
Filters
10
11
Creating Sites
Overview
A site is a group of related content pages with a consistent look and feel, defined by a common layout, theme, and
URL suffix. Typically, all pages assigned to a site are given the attributes that are defined at the site level, such as
the theme and layout, although individual pages can specify otherwise. At the very least, a site needs the following
fields defined: homepage, search results page, layout, URL suffix, and theme. All pages within a site can be accessed
via the site URL suffix.
Associating a page with a site provides the following benefits:
All pages within a site use the site default layout and theme, saving time.
All pages within a site can be accessed using a uniform URL: customer.service-now.com/site-name/page.do.
All pages within a site that have a search widget use the same search page.
Before creating a site for the first time, review the Content Management Overview page to understand the concepts
and principles of using CMS.
Creating Sites
12
Field
Input Value
Name
URL suffix
The URL suffix for the site. It is incorporated into the URL as follows: http://instance.service-now.com/url_suffix/page.do
Home page
The page to display when the user does not specify a page name in their URL: http://instance.service-now.com/url_suffix/
Search page
The page that displays search results when a user searches from any page within the site.
Login page
The page to use for logging in to the site. If specified, users must log in to access the pages on the site. If left blank, no login is
required to access the pages within the site.
Gauge target
page
The page that displays gauge content. When the user clicks a gauge on the new site, the gauge target page opens showing the
gauge content. The gauge target page replaces the CMS page in the current tab.
Title
A title for the site. The title can be the same as or different from the Name.
Description
Default layout
The layout for pages to use by default. Any page in the site that has a blank Layout field uses the layout set here.
Default theme
The theme for pages to use by default (see Theming Content Pages). Any page in the site that has a blank Theme field uses the
theme set here.
Simple catalog
display
Option to simplify catalog pages in the site by hiding the search bar, breadcrumbs, and the results per page choice list. Selecting
this option prevents you from adding attachments from record producers to your CMS site.
Clear this check box to display the search bar, breadcrumbs, and the results per page choice list in catalog pages.
Use external
cart
Option to omit the default cart when rendering catalog pages within a site that contains catalog pages. Provide a catalog cart
block somewhere on the site to allow users to make catalog requests.
Note: If you select to use an external cart, the no cart checkbox on a service catalog item has no effect; the external cart appears
for all items.
Creating Sites
DIV-Based Layouts
A DIV-based layout option is available. Many web page layouts use tables for a consistent look and feel. Tables are
effective for numbers and statistics, but can be limiting for designing other types of information. DIV tags are
flexible block-element tags. To use DIV tags for layouts, give the tag an ID and assign attributes using CSS.
Changing to CSS and DIV tags can:
simplify code
reduce the amount of code
increase page load speed
separate content from presentation
help pages adapt to different device resolutions
make pages easier for search engines to crawl
make code more compliant with evolving web page design standards
A theme named Administration Theme - Charcoal is included as an example of CSS-driven, DIV-based layouts.
To view the sample code in Administration Theme - Charcoal for a DIV-based layout:
1. Navigate to Content Management > Design > Layouts.
2. Click Admin 1 Column.
13
Creating Sites
14
Copying a Site
To create a new site quickly, copy an existing site.
The site copy option creates a complete standalone copy of the site and all of its resources. If you are copying a site
to create a second site, it is best to use this option after the first site is complete, tested, and production ready. This is
important because the blocks, CSS, and pages are duplicated to support the new site. There are a number of reasons
why site copying is useful, such as site versioning, branding, or creating a backup.
Note: To copy just a few pages without duplicating the resources (CSS, blocks, menus) themselves, use the page copy option, which
duplicates the page but not the resources used in the page. This is the key difference between copying a page and copying a site. For
more information, see Copying a Page.
This name is used as a prefix for all of the site elements duplicated.
A progress bar shows the copy process. When the process is complete, the Site form shows information for the
new site.
15
16
17
For example:
http://<instance
name>.service-now.com/redirector.do?sysparm_uri=/ess/incident.do%26sys_id=46e3e949a9fe19810069b824ba2c761a
Note: If you are using SAML 2.0 update 1 for SSO, use the UI page saml_redirector instead of creating a new UI page. For example,
an email link to a SAML 2.0 redirector page would use the URL format: http://<instance
name>.service-now.com/saml_redirector.do?sysparm_uri=/ess/incident.do%26sys_id=46e3e949a9fe19810069b824ba2c761a.
Login Rules
Login rules have been deprecated. Instead, set a login page on the site record. Login rules will continue to work, but
users can now log in or out directly through the content site. Login rules dictated what the user would see after
logging in. Typically, login rules were used to automatically present the user with an entry page based on their roles
or permissions within the system.
Creating Pages
Overview
The core of the content management system is a page. Pages are built from content blocks and organized into sites.
Pages display as regular webpages that are rendered in HTML. Constructing a content page requires a basic
knowledge of HTML.
Content pages are formed by arranging content blocks in pre-defined layouts. They can be used to present login
pages, search pages, or ServiceNow content.
Before creating a page for the first time, read the Content Management Overview.
Best Practices
When creating pages for a content site, first create a few master template pages and then use the master templates to
generate the necessary pages. For detailed information about creating templates, see Templates.
Creating Pages
18
Field
Name
Input Value
Enter a unique name for the page.
As a best practice, prefix each page name with the name of the site followed by a dash and then the function of the page in the site.
For example, ESS - Catalog Detail, ESS - Search Results, and ESS - Site Entry are all clear names for pages within the ESS site.
URL suffix
Enter the URL suffix for the page. The suffix is incorporated into the URL as follows:
http://instance.service-now.com/site/url_suffix.do
Parent page
Select the existing page that will be the parent of the current page. Parent pages keep sections within large sites sortable on the site
list of pages. Parent pages are also used to dynamically create basic bread-crumb functionality. Use CSS to define menus that give
the Parent page context within the user interface.
Layout
Select a layout to use for the page. Layouts define dropzones where content blocks can be added to the page.
If this field is left blank, the page inherits the site's default layout. If the site does not have a default layout, there will be a single
dropzone for the entire page.
Content
theme
Select a theme to use for the page. Themes bundle CSS style sheets that are applied to all content within the page.
If this field is left blank, the page inherits the site's default theme. As a best practice, use the site's default theme unless the page
requires a different set of CSS style sheets from the other pages in the site.
Frame buster Select this option to remove any restrictions placed by frames that contain the page. This is used to avoid frame-within-frame issues
that may sometimes occur with improper linking.
Content site
Select the site associated with the content page. If you created this page from the site's related list, this information is automatically
provided. The content site also determines part of the page URL, as follows:
http://instance.service-now.com/site_suffix/page_suffix.do
Read roles
Click the lock icon to open a list for selecting roles that can view the page.
Model
document
Page status
Created by
Specify the user who created the page. If you are logged in with a role that has higher privileges than your user name and you enter
your user name, the field defaults to the role. For example, if you are logged in as an Admin and you type your name, which has
lower privileges, this field will display Admin.
Title
Description
Creating Pages
19
You can create new content blocks by adding one of the content blocks named *New [block type] to the page. For
more information on using stub blocks to create new content, see Using Content Blocks.
Copying a Page
Copying pages is an efficient way to
avoid duplicating the same work and to
create pages quickly from a guiding
master template.
1. Navigate to Content Management
> Site and select the site.
2. Select the page to copy.
3. Click Copy.
4. Rename the page.
5. Edit the page.
6. Click Update.
Assigning Pages to a
Site
If you have created multiple sites, you
can add pages from one site to another.
Adding content blocks
2. Select a site.
3. In the Pages related list, click Edit.
4. Select other pages to include in the site.
5. Click Save.
6. Update the site.
Creating Pages
20
Depending on the data or tables you plan to use, you may need detail pages. These are pages defined by content
types:
Knowledge detail page - used to display a full knowledge article detail (mandatory for the site)
Incident page - detail page for an incident record
Catalog page - detail page for all items, content items, order guides, and record producers
There are two page templates you can use when creating new sections:
Parent page - keeps sections within large sites organized and sortable on the site list of pages. Also used to
dynamically create basic bread-crumb functionality.
Detail page - differs from the parent page in that the content area displays a full article or detail instead of a
selection of related content (detail pages must have a Current Document block)
Note: These pages are mandatory if you plan on accessing system data. For example, if you plan on showing the service catalog in
your CMS, you need a service catalog content type (referencing the sc_cat_item table) and a detail page that provides the full view of
the item.
21
22
23
5. Go to the administration page by adding administration.do to the end of the address in the browser window. For
example, http://yourinstancename.service-now.com/ess/administration.do.
<style>
DIV.cms_administration_home {
background: url(gray_${current_page.getURLSuffix()}.pngx)
no-repeat right top;
}
</style>
<div class="cms_administration_home">
${body}
<br/>
<!-- Would you like to pivot off of parent page instead?
<j:if test="${current_page.getParentPage().getURLSuffix()=='administration'}">
<g:content_block type="content_block_menu" id="7afc342def002000914304167b2256ac"/>
</j:if>
The defaults use the page URL suffix to define sub menus
-->
<j:if test="${current_page.getURLSuffix()=='administration'}">
<g:content_block type="content_block_menu" id="7afc342def002000914304167b2256ac"/>
</j:if>
<j:if test="${current_page.getURLSuffix()=='community_inspired'}">
<g:requires name="ess.portal.globals.jsdbx" />
<g:content_block type="content_block_menu" id="ccd4b8c7efb70000914304167b22566e"/>
</j:if>
<br/>
</div>
Header Blocks
Menu Blocks
List Blocks
Static HTML Blocks
Dynamic Blocks
Flash Movie Blocks
Detailed Content Blocks
iFrames
24
Header Blocks
A header block is a visual element placed at the top of pages. The header block provides a place for branding and
areas for important site-wide functionality. Global search, text size toggle, menus for navigational purposes, and the
user name with logout link are some of the options that are available in headers.
To create a new header block, navigate to Content Management > Headers. Click New and fill out the Header
form.
Field
Input Value
Name
Background
Select a background for the header logo and menus. Choices are:
Image
If Background is Gradient/Image, use this field to upload an image for the background of the header block. For gradients, upload
a gradient image.
Top bar color. If Background is 'Colored Bars, enter a CSS color or color name to use as the background for the top menu.
Middle bar
color.
If Background is Colored Bars, enter a CSS color or color name to use as the background for the logo and text.
Bottom bar
color.
If Background is Colored Bars, enter a CSS color or color name to use as the background for the bottom menu.
Logo
Select an image to serve as a logo. The image is also a link to the main page.
Active
Select this check box to make the block available for use.
Text
Conditional
Enter any scripted conditions to be applied. If selected, adds a Condition script field to the form.
Category
Select a category to provide organization for the header block. The category also determines the detail page in which header block
links will open. (Detail pages often display information in very different ways). Default options include:
None
General
Knowledge Base
Service Catalog
Top Menu
Bottom Menu
Height
Search
Font sizer
Select this check box to include text sizing controls in the header.
Login
Select this check box to include a login link in the header. If the user is logged in, this element displays the user name and a logout
link. If you specify a login page on the site record, it is important to include a login link so users have a place to enter their
username and password.
Chat Queue
Select the chat queue that users access by clicking the Help Desk Chat button in the header. Clear the field to remove the button.
This field appears only if the Chat plugin is active. To learn more, see Making Help Desk Chat Accessible to End Users.
25
Menu Blocks
A menu block provides a menu of navigational links to different content pages.
For more information, see Creating a Navigation Menu Block.
List Blocks
A list block generates a list of links dynamically by querying a table or using a script. When the user clicks a link,
the associated content renders in a detail page based on its content type.
For information on creating and configuring list blocks, see Creating a List Block.
Input Value
Name
Category
Select a category to provide organization for the static HTML block. The category also determines the detail page in which static
HTML block links will open. (Detail pages often display information in very different ways). Default options include:
None
General
Knowledge Base
Service Catalog
Frame
Select a border styling for the static HTML block. For more information, see Creating a New Frame.
Active
Select this check box to make the block available for use.
Conditional
Enter any scripted conditions to be applied. If selected, adds a Condition script field to the form.
Static
Content
Enter HTML code that determines the behavior of the static HTML block.
26
8. Paste the following code into the HTML block, substituting the image name as uploaded above. Notice the "x" at
the end of the filename--this is required for image caching.
<img src="mascot.gifx"/>
Now the image is a static HTML block and can be added to any content page. Standard HTML code can be used to
alter the image in the content block.
Dynamic Blocks
Use dynamic blocks for blocks that need to use scripting or pull information from the system. A good use of
dynamic blocks is job postings. Store the postings in knowledge articles and display the postings with a dynamic
block.
ServiceNow provides several predefined dynamic blocks including:
New Content - Each of the new content blocks allows for creating new blocks while editing content pages
Clean Login - The default login page requesting user name and password, which includes a "Remember Me"
check box. After the user logs in, this block triggers login rules.
Login - An area that allows a logged out user to log in and a logged in user to log out. This block is especially
useful on publicly available content pages.
Search - The global text search field. Currently, this is the only form of search that can be included in a content
page.
Search Results - An area for displaying global text search results.
For information about Jelly, see Jelly Tags.
To create a new dynamic block, navigate to Content Management > Dynamic. Click New and fill out the Dynamic
Content form.
Field
Input Value
Name
Category
Select a category to provide organization for the dynamic block. The category also determines the detail page in which dynamic
block links will open. Default options include:
None
General
Knowledge Base
Service Catalog
Frame
Select a border styling for the dynamic block. For more information, see Creating a New Frame.
Active
Select this check box to make the block available for use.
Conditional
Enter any scripted conditions to be applied. If selected, adds a Condition script field to the form.
Two phase
Dynamic
content
Enter the XML script field that determines the behavior of the dynamic block.
27
Specialty Blocks
The following three modules contain content types that can be dropped into content management pages in the same
manner as Content Blocks, but speciality content is specific types of content that warrant their own sections. Links
are not blocks, but are key to the navigation of the system and are organized and arranged within "List" blocks. For
example, when creating a link with a category, a list can be generated that calls the content_link table and filters on
the category.
28
Input Value
Type a unique name for the Flash movie block.
Source Determines where the Flash movie will be found. Choices are:
Attachment - If this choice is selected Upload the flash movie to this record.
Link to External Object - If this choice is selected, a URL field is displayed. Specify the Flash movie URL and ensure that the Flash
movie is publicly accessible.
Input Value
Name
Category
If the block Type is Show the page's current document (see below), the category displays content from any link of the same
type. Default options include:
None
General
Knowledge Base
Service Catalog
Frame
Select a border styling for the detailed content block. For more information, see Creating a New Frame.
Model
Document
Select the document to display by default. Clicking the reference icon displays the Select Document dialog:
Active
Select this check box to make the block available for use.
Type
Select the behavior for the block. Select one of the following:
29
Conditional
Enter any scripted conditions to be applied. Selecting this check box adds a Condition script field to the form.
Script
Enter a script to find an appropriate document if the Type is set to Use a script to find a document and is True. The Return
should be set to the GlideRecord of the desired document.
iFrames
An iFrame embeds a URL on a page within a frame. It can be used to embed external pages or to render ServiceNow
content within the content page. It is common to define an iframe with forms created in the system and link to the
page in which the iframe resides.
To create a detail block, navigate to Content Management > iFrames and click New.
Field
Input Value
Name
Frame
Name
Enter a name for the frame on the page. Note that when using iFrames to present ServiceNow content (such as forms or lists), the frame
name should be gsft_main so that links within the iFrame will open within the iFrame.
URL
Enter the URL to display in the iFrame. If using the iFrame to display ServiceNow content, leave off the base instance portion of the
URL and start with the page name. For example, to show the list of requested items, the URL is:
sc_req_item_list.do
Queries can be applied to the URL. For instance, to display a list of requested items where 'Active = True, the URL is:
sc_req_item_list.do?sysparm_query=active=true
For more information, see Navigating by URL.
Sizing
Note that the Expand to fit content choice only works with ServiceNow content. If Fixed Size is selected, height and width fields are
displayed for setting the size, in pixels.
Note: Some browsers suppress iFrames because of they use an X-Frame-Options header value of SAMEORIGIN. The
XFrame-Options header was introduced in Internet Explorer 8 RC1, to help detect and prevent frame-based redressing. The
SAMEORIGIN value causes the browser to render a blank page instead of the target page of the <frame> or <iframe> when the
frame target is not on the same origin as the page itself. Support for this header has been implemented in Safari 4.0, Chrome
4.1.249.1042, and Firefox 3.6.9.
Content Types
Content types define the following features of associated documents:
What does a link to one of these documents look like? For example, if a list of these documents is displayed on a
page, what does each entry in the list look like?
What does a detailed view of one of these documents look like?
What detail page should be used to display the document? (This is important and often an area of confusion for
new CMS users.)
The page that a list of documents points to is determined by the document content type, not by the list itself. The
content from a link is displayed in a detail content block on a page. The content type determines which page's detail
block the document content is displayed in.
For example, the list block Catalog Top 5 displays the top 5 items in the Service Catalog table, sc_cat_item.
Because the table is sc_cat_item, the content type sc_cat_item controls how the Catalog Top 5 list is displayed.
Clicking any item in the list displays the Service Catalog Detail page with the item displayed on it according to the
detail template script. Content types are applied:
in search results to link to the correct page
in the Current Document block to display the current record
in links on lists and other places that link to record types
Several content types are available by default for tables such as Catalog Item [sc_cat_item], Gauge [sys_gauge], and
Page [content_page].
Content type defaults set for CMS can be overridden for individual sites. Use the Content Types related list on the
Site record to customized content types.
30
31
Description
Type
Content site
Media type
Enter one of the following media types to use with this content type or leave the field blank to use the UI11 or classic interface.
doctype: UI15 and UI14 desktop interface only (available starting with the Eureka release)
m: Smartphone interface only (not for CMS use)
mobile: Legacy mobile interface only (not for CMS use)
tablet: Tablet interface only (not for CMS use)
Default detail
page
Gauge page
Select which page is used as the drill-through target for any gauge. If you display a gauge on a CMS page, then clicking on the
links loads the page specified here.
Summary
Template
Write an XML script that determines how the list is displayed in the list block, if the link is displayed in a list block.
Detail Template
Write an XML script that determines how to display the associated information after a user clicks the link.
Style Sheets
Style Sheets are standard Cascading Style Sheets (CSS) that define the look and feel of all elements within the
interface. CSS can either be internal (stored in the database) or external (hosted on the server), based on
organizational needs. To define an internal style sheet, use standard CSS in the style field. Using external CSS
allows the Content Management System to use exactly the same CSS as a corporate website or other online resource.
Use an external style sheet by defining a URL that points to the .cssx file. If you upload a .cssx file to the platform,
the .cssx file can then be referenced using a URL.
Content pages do not reference style sheets directly. To invoke a style sheet, you must assign the style sheet to a
Theme using the related list on the Theme form.
32
Themes
Design themes are the convergence of structure and styling, making them a critical tool for creating a powerful user
interface. Understanding corporate design guidelines and maintaining communication with the art team responsible
for the corporate website are important to the success of the project. If the organization has an art or design
department that maintains branding, they should be included in this process.
A theme is a collection of one or more style sheets (CSS files) that define a consistent look for a set of pages. In most
environments, a large number of pages share a very small number of themes, usually one. Multiple themes can be
used together within a site to create stylistic differentiators between site areas or a single theme can create one
unified look and feel for the site.
Frames
Frames provide a way to manage decorative containers for content blocks and any other elements within the site. For
example, one frame might be a container (made of div or span tags) styled with rounded corners. A frame UI macro
is used by individual content blocks to define the frames. When viewing a content block form, the Frame field offers
a choice between the different frame UI macros. The frame UI macro does not, however, have the definition for the
frame within its Jelly script. Instead, it references a particular frame as defined in a style sheet.
Creating a new frame is a two step process:
1. Define the frame in a style sheet.
2. Create the new frame UI macro to invoke the frame definition.
33
Navigate to Content Management > Frames and select one of the existing frame UI macros.
Change the name to match the FRAMENAME used in the style sheet.
Right-click the header bar and select Insert and Stay.
Update the frame name in the XML field as shown:
<div class="FRAMENAME">
#:
5. Submit.
This UI macro can now be selected from any content block's form.
34
35
Input Value
Name
Enter a unique name for the list content block. This name is used to identify the record in ServiceNow and is not displayed on the
content page. Use the Title field for that purpose.
Category
Select a category to provide organization for the list content block. Default options include:
Type
None
General
Knowledge Base
Service Catalog
Frame
Select a border style for the list block. For more information, see Creating a New Frame.
Advanced
Select this check box to enable generating a list from a script, rather than a simple filtered query on a particular table.
Query
Active
Select this check box to make the block available for use.
Title
Enter the name to display at the top of the list block when it appears in a content page.
Maximum
Entries
Table
Select a table to query for the list items. The table determines which detail page appears when a user clicks a link in the list block.
For more information, see Configuring the Content Type.
Note: The list shows only tables and database views that are in the same scope as the list block (starting with the
Fuji release).
Conditional
Select this check box to enable the use of scripted conditions. If selected, a Condition script field is added to the form, along with
the Logged On and Omit if empty check boxes.
36
Example 1
Site Level
Name
breakfast
lunch
Content
eggs
sandwich
Page Level
Name
dinner
Content
steak
Output
Name
breakfast
lunch
dinner
Content
eggs
sandwich
steak
Example 2
Site Level
Name
breakfast
lunch
Content
eggs
sandwich
Page Level
Name
lunch
dinner
Content
tacos <--- overrides site level
steak
Output
Name
breakfast
lunch
dinner
Content
eggs
tacos
steak
37
Note: The Content Management System does not support some commonly used meta tags. For example, you cannot use the
X-UA-Compatible meta tag, which allows you to specify which version of Internet Explorer a should be rendered in.
38
39
<j:if test="${current_page.getName()=='Solutions'}">
<p class="page_description">
${current_page.getDescription()}
</p><br/>
</j:if>
<p class="page_description">
${current_page.getDescription()}
</p><br/>
</j:if>
</j:jelly>
Ensure that all tags are closed. If the tag is not a naturally closing tag, then place a forward slash before the end
bracket. For example, a <BR /> or an <IMG src="cms.png" />.
If you are unfamiliar with Jelly, review these wiki pages:
Jelly Tags
Extensions to Jelly Syntax
How to Escape in Jelly
Following is some additional information to get you started.
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
This tag should be included with all Jelly scripts. It looks complex, but remember the following:
1. Multiple namespaces are used in each Jelly script.
2. There are two types of prefixes used in tags: j and g. The j prefix is used for tags that are natively part of Apache
Jelly. The g prefix is used for tags that ServiceNow created in the system for ServiceNow purposes.
The j2 and g2 prefixes are just like j and g, except that they are processed in a second phase. When Jelly script is
parsed, the parser runs through each j and g tag respectively. For example,:
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="jvar_phase1" value="Hello" />
<j2:set var="jvar_phase2" value="World" />
${jvar_phase1} $[jvar_phase2]
40
In phase one, the parser runs through all of the j and g tags. It then caches the result. Before it runs the second phase,
it takes the j and g namespaces and moves the namespaces to the second phase. It looks something like this:
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="jelly:core" xmlns:g2="glide">
<j2:set var="jvar_phase2" value="World" />
Hello $[jvar_phase2]
</j:jelly>
The next example creates a report of all open incidents assigned to each group. (For this purpose, you could use a
report and save a lot of time, but it is a good example for learning Jelly.) Start with the Jelly tag:
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
</j:jelly>
First, you need a list of open incidents. For this, use a g2:evaluate tag. The evaluate tag is used to run script.
Anything inside of the tag is parsed just like a business rule, so you can call, for example, global business rules,
script includes, and gliderecord.
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_groups" object="true">
var gr = new GlideRecord("sys_user_group");
gr.orderBy('name');
gr.query();
gr;
</g:evaluate>
</j:jelly>
This is in phase one because we are not expecting frequent changes to the incident assignment groups. Also notice
the var attribute on the evaluate tag. This specifies what variable will be set from this block. At the end of the script,
there is a gr on a line by itself. That last line is what sets the variable.
You can omit the jvar_groups variable, but then all of the variables in the evaluate tag become Jelly variables.
The object=true specifies that the variable is not a primitive data type. If object=true were omitted, the
script would break because jvar_groups would only be able to hold items like integers and strings.
After the evaluate tag, you need to loop through these groups and find the incidents for each one.
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_groups" object="true">
var gr = new GlideRecord("sys_user_group");
gr.orderBy('name');
gr.query();
gr;
</g:evaluate>
<table>
41
42
<tr>
<th>Name</th>
<th>Incidents</th>
</tr>
<j:while test="${jvar_groups.next()}">
<tr>
<td>${HTML:jvar_groups.getValue('name')}</td>
<td></td>
</tr>
</j:while>
</table>
</j:jelly>
You can include normal XML in Jelly script at any time. Since there is no namespace, the Jelly script does not try to
parse the XML tags. Notice the j:while loop. It is a normal while loop and can iterate through a GlideRecord object.
Also notice that you output a value with ${HTML:jvar_groups.getValue('name')}. Here are the
important elements:
The outer brackets, ${}, specify the output of the variable and the phase in which the variable is output: ${}
means first phase, $[] means second phase.
HTML before the expression is for escaping of the output. The expression
jvar_groups.getValue('name') is being escaped for HTML. For other types of escaping, there are JS
(Javascript), NS (No Script), and some other options.
To select only one record and not iterate through a large number of records, the code would look like this:
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_groups" object="true">
var gr = new GlideRecord("sys_user_group");
gr.orderBy('name');
gr.query();
gr;
</g:evaluate>
<j:if test="${jvar_groups.next()}">
We found ${HTML:jvar_groups.getValue('name')}
</j:if>
</j:jelly>
Code Examples
1. Header Example Code
This dynamic content block needs to be active and have the "Two Phase" option clicked. The g:requires tag is
including the UI script defined in the system whose name is "servicenow.website.globals". The file extension in the
call is .jsdbx and is used only in the call to the UI script, not in the name of the script in the system. For JSDBX, the
file being called is a JavaScript(.js) defined within the database (db) that needs to be cached (x).
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
</j:jelly>
<j:if test="${current_page.getName()=='Solutions'}">
<p class="page_description">
${current_page.getDescription()}
</p><br/>
</j:if>
<p class="page_description">
${current_page.getDescription()}
</p><br/>
</j:if>
</j:jelly>
43
<br/>
<tr>
<td class="cms_knowledge_list_image">
</div>
</j:if>
</td>
<td width="100%">
<span class="cms_knowledge_list_link">${current.short_description}</span>
</a>
<p class="kb_description">
"${current.description}"
<!--${SP}-${SP}<span class="cms_knowledge_list_author">${current.author.first_name}${SP}${current.author.last_name}</span>-->
</p>
</td>
</tr>
<tr>
<p class="kb_learn_more">
</p>
</td>
</tr>
</table>
</g:for_each_record>
</div>
</j:jelly>
44
Drop-down menus
Two types of tab menus
Vertical, clickable list, usually placed on the left side
Horizontal blocks
Vertical blocks
Super menu (a menu of menus)
45
Navigation Menus
Navigation Menus
Overview
Navigation menu blocks enable you to create a menu of links to different content pages.
Navigation menus are defined by three objects:
Menu Block - The menu block defines the entire menu block and how it is displayed.
Menu Section - The menu sections define groups of links displayed within the block.
Menu Item - The menu items define the links within the block.
Select the desired menu block style to open the Navigation Menu form. Older instances open the Navigation Menu
form directly.
Fill out the Navigation Menu form to define the block.
46
Navigation Menus
Field
47
Input Value
Name
Type
Select the type of navigation menu, which determines how the links are displayed. For more information, see Navigation Menu Block
Types.
Frame
Select a border style for the navigation menu block. For more information, see Creating a New Frame.
Conditional Select this check box to enable the use of scripted conditions. If selected, a Condition script field is added to the form, along with the
Logged On check box.
Logged on
Select this check box to display the navigation menu block only if the the user is logged on. This field appears only if Conditional is
selected.
Condition
Enter a script to define the conditions for the navigation menu block. This field appears only if Conditional is selected.
Active
Select this check box to make the block available for use.
Category
Select a category to provide organization for the navigation menu block. The category also determines the detail page in which menu
links will open.
Input Value
Name
Content block
menu
Redirect to
Select what appears when a user clicks the menu section name and icon.
URL
Click the lock icon to open the edit field, then enter the URL to display when a user clicks the menu section title and icon. This
field is available only if Redirect to is set to The specified URL.
Detail Page
Select the content page to open when a user clicks the menu section title or icon. This field is available only if Redirect To is set to
A content page.
Left Image
Right Image
Second Level
Text
Active
Select this check box to make the menu section available for use.
Order
Enter a number to indicate where this section appears on the menu relative to other menu sections.
Logged on
Select this check box to display the menu section only if the the user is logged on.
Roles
Click the lock to open a list, then select the roles that can access this menu section if you want to restrict access by role.
Category
Open In
iFrame
Enter the name of the iFrame where the link should open when a user clicks the menu section title and icon. Make sure that there is
an iFrame on the page where the link opens. This field is available only if Open In is set to Named iFrame.
Navigation Menus
48
Input Value
Name
Menu
section
Redirect to
Select what appears when a user clicks the menu item name and icon.
URL
Click the lock icon to open the edit field, then enter the URL to display when a user clicks the menu item title and icon. This field is
available only if Redirect to is set to The specified URL.
Detail Page Select the content page to open when a user clicks the name or icon. This field is available only if Redirect To is set to A content
page.
Image
Active
Select this check box to make the menu item available for use.
Order
Enter a number to indicate where this item appears on the menu relative to other menu items.
Logged on
Select this check box to display the menu item only if the the user is logged on.
Roles
Click the lock to open a list, then select the roles that can access this menu item if you want to restrict access by role.
Category
Open In
iFrame
Enter the name of the iFrame where the link should open when a user clicks the menu item name and icon. Make sure that there is an
iFrame on the page. This field is available only if Open In is set to Named iFrame.
Menu Types
By changing the Type field on the navigation menu block, you can format the same menu in different ways.
Drop-Down Menu
The drop-down menu renders the menu sections as drop-down list. Use the mouse to hover over the menu name and
view the menu items.
Navigation Menus
The tab menu renders the menu sections as tabs. Use the mouse to click the tab and view the menu items.
Horizontal Blocks
The horizontal blocks menu renders the menu sections as block headings with menu items as links within the blocks.
The blocks are arranged horizontally.
The tab content block (horizontal) menu renders the menu sections as tabs with menu items as links within the block.
Vertical List
The vertical list menu renders the menu sections as headings with menu items as links below them.
49
Navigation Menus
Vertical Blocks
The vertical blocks menu renders the menu sections as block headings with menu items as links within the block.
The blocks are arranged vertically.
Super Menu
The super menu is a hybrid between the drop-down menu and the tabbed system that allows the user to create a
menu out of any number of menus.
TD.layout_content_submenu_column DIV.cms_menu_section_blocks {
width: 156px;
height: auto;
float: left;
50
Navigation Menus
51
position: relative;
border-style: solid;
margin: 0px 0px 0px 0px;
border: 0px solid #e0e0e0;
padding: 0px;
background: none;
padding: 24px 12px 0px 12px;
}
TD.layout_content_submenu_column DIV.sub_menu_section {
width: 156px;
height: 20px;
float: left;
border-style: solid;
border: 0px solid #e0e0e0;
padding: 0px;
background: none;
padding: 0px 12px 0px 12px;
}
SPAN.cms_sub_menu_list_link, TD.submenu_cell A
color: #FFF;
}
TD.layout_content_submenu_column IMG.menu_bullet{
display: none;
}
TD.layout_content_submenu_column a.cms_menu_block_item {
margin:0;
padding: 0px;
font-size:11px;
color:#FFF;
}
TR.layout_content_submenu_row TD.layout_content_submenu_column{
Navigation Menus
background: transparent url(sub_menu_background.gifx) repeat-y
center top !important;
}
p.cms_menu_separator {
border-top:1px dotted #ccc;
margin-top: 6px;
margin-bottom: 6px;
}
a.cms_menu_block_item {
margin:0;
padding: 0px;
color:#999;
font-size: inherit;
}
/*******************************************************************************************
52
Navigation Menus
53
TD.cms_header_bottom_menu div.cms_menu_section_blocks {
width: 200px;
float: left;
border: 0px;
margin: 0px 0px 12px 0px;
padding: 0px;
background: none;
}
TD.cms_header_bottom_menu p.cms_menu_separator {
border-top:0px dotted #ccc;
margin-top: 0px;
margin-bottom: 0px;
}
TD.cms_header_bottom_menu
.cms_menu_super_menu_bar_item {
/*style an
TD.cms_header_bottom_menu
.cms_menu_super_menu_bar_item_selected {
Navigation Menus
54
padding-right: 12px;
padding-bottom: 8px;
padding-top: 4px;
cursor: pointer;
cursor: hand;
background: #fff url(super_menu_bkg.gifx) no-repeat left top;
font-weight: bold;
border-right: 0px solid #CCC;
border-bottom: 0px solid #CCC;
border-left: 1px solid #DDD;
border-top: 1px solid #EEE;
TD.cms_header_bottom_menu
.cms_menu_super_menu_content { /* style
TABLE.super_menu_video_table {
background: #787878 url("grey_background.pngx") repeat-y scroll
center top;
width: 184px;
}
References
[1] http:/ / www. w3. org/ WAI/ eval/
55
56
Reference
Content Management Application Reference
Modules, Tables, and Parameters
The Content Management System contains several modules, tables, and parameters. Use the table names as a
reference to each item that you add within the system. For example, when generating navigational lists within a CMS
site, you need to reference the content_link and content_page tables.
The Content Management application is laid out according to the inherent site building hierarchy:
Site
Pages
Content blocks
All of the design elements are separated from the code into their own tables:
Parameter
Sites
Site
Site [content_site]
Pages
Page
Page [content_page]
All Blocks
Pages are built from reusable pieces of code called blocks. Blocks represent the different types of content that can be
added to a content page. For more information, see Using Content Blocks.
Module
57
Table
Parameter
Block Types
All
Content Block
Headers
Header
Lists
List of Content
Static HTML
Static Content
Flash Movies
Flash Movie
Content Links
Content Link
IFrames
IFrames
IFrames [content_block_iframe]
Design
These modules define the visual style of the content pages:
Themes
Style sheets
Layouts
Frames
Images
Configuration
These modules control how the content management pages function:
Configuration Page
Page Detail Settings
Content Types
List Definitions
Login Rules
58
Planning Checklist
Read the Content Management System pages of the wiki so you understand how the system works.
Determine the business needs the website must fulfill and consider the return on investment (ROI).
Interview the user base and compile a cohesive list of requirements that may be mandated by sites in current use.
Identify the ServiceNow system data that will be brought into the CMS site, as well as data from any other
sources.
Use the content and data definition to establish a rudimentary site map and entry pages for the site.
Establish consistent site language and terminology by using an existing organizational style guide or creating a
style guide if necessary.
Use categorization and hierarchies to create a consistent navigational model.
Address these related questions:
59
60
Resource Planning
Since you determined the data you will be using, you also have an understanding of the content owners. The best
insights from the launch of the ServiceNow corporate website were about data, but they translated directly to the
people involved with long-term maintenance of the site.
When it comes to resources, quantity does not always equal quality. The number of people added to a project
involving site design may not matter. Sheer numbers do not increase productivity and may even stifle progress. The
following actions are essential:
Limit team size.
Place talent where appropriate.
Establish clear lines of communication.
These actions can prevent team members from interrupting or duplicating each other's work. The actions can also
establish security definitions and role-based views for everyone working on data within the system.
Start with a small, focused team
Before starting work on a website, two groups should be identified:
One group gathers corporate style design guidelines, defines all of the copy (written terminology and text that will
exist in the site), and defines the site flow. This is a content management group with skills that include:
The second group executes the designs and creates the website. They also create templates, icons, and graphical
elements. This is a webmaster group with skills to maintain a working website, including:
61
The base system site template, the ESS portal, illustrates how the platform can be themed to match corporate
branding guidelines.
Base System Resources
The ESS portal is a simplified working example for customers to use. Rather than editing the base system examples
within content management, we suggest that you make copies of the sites, pages, themes, and blocks. Then, modify
your copies. This ensures that you can leverage the base system updates that will be rolled into future releases of the
content management plugin.
If the ESS portal meets the business needs of your project, copy the portal and use it as a reference guide to your new
site. If you need to do a great deal of customization, helpful pages include Creating a Content Page, Using Content
Blocks, and Styling in Content Management. Light customization would be changing the logo, adding a few links to
the menu, and changing the colors of the tables and menus. Heavy customization would be altering the layout,
changing the menu system, or editing anything within the content area.
62
63
References
[1] http:/ / www. nngroup. com/ reports/ intranet/ design/
[2] http:/ / community. service-now. com/ blog/ markodonnell
64
Static Methods
In the CMS application shown, note the items highlighted in gray. These CMS modules were created for ease of use.
Form-based menu management and WYSYWIG code editing can be extremely useful to both advanced and
entry-levels users. The technical ability of subject matter experts (SMEs) managing the language of your site may
vary considerably. Allowing SMEs to write the content and a technical resource to manage the linking may work
well. This division of labor can expedite menu and link creation within the system.
Navigation Menu Links are a great way to group similar links and
are some of the most powerful interface components available to
site designers using the CMS. They are base system templates used
to group content links for placement on the page. Though the
terminology is a bit different (menu sections and menu items), this
type of linking behaves the same way as content links. For more
information, see the Navigation Menus wiki page.
Static HTML Details may be present on a page to which a link
points. These content blocks are only useful for areas that are
administered by those unfamiliar with HTML or markup. Anyone
familiar with markup should use dynamic blocks because they are
extendable. For more information, see the section about static
HTML on the Using Content Blocks wiki page.
Content Links are the predecessors to navigation menus and were
used when the CMS was first introduced. Use content links to make
navigational links by defining a number of content links under the
same category. Then, call the links as a list referencing the Content Link [content_link] table.
iFrame Details are used both dynamically and statically throughout the system. Using them can be an extremely
easy way to bring any form or list into your CMS pages. For more information, see the section about iFrames on
the Using Content Blocks wiki page.
Dynamic Methods
While static methods can be a powerful navigational tool, the dynamic nature of the system allows you to have more
control over data rendering. You can reference common code in the system and make long-term maintenance of the
site easier. A team member with coding skills can be very useful when implementing dynamic methods.
Dynamic Blocks are the blocks where the majority of your work will reside. For more information, see the
dynamic blocks section on the Using Content Blocks wiki page.
Frames should be mentioned together with dynamic blocks because frames are essentially UI macros with the
category of frame. Frames are meant to be decorative wrappers around any block in the system. Frames apply the
${body} variable to a block and define where the block is inserted when rendered on the page.
Lists generate links to records within the system based on the filtering rules you define. Lists can be sorted for
presentation by any field in the corresponding record. Lists are a powerful tool to help supplement navigation and
pull data from outside the CMS. For more details, see the Creating a List Block wiki page.
Content Types provide site-specific control of how system data defined as templates is rendered. First considered
is the rendering of lists (summary templates), followed by the detail template, which allows control over the
record rendering. For more information and examples, see the Content Types wiki page.
List Definitions enable you to extend the summary template defaults defined on the site level. Used together with
frames, list definitions can be a powerful way to render the same data differently based on its placement on the
page or site. More details are available on the discussion of list definitions on the Creating a List Block wiki page.
Detailed Content (in Page Detail Settings) are blocks that display the content of an existing document as a block
on a content page. For more information, see Using Content Blocks.
Linking to Content
You can use URLs to link to elements within the system. See the Navigating by URL wiki page for an overview of
URL syntax in ServiceNow.
65
Examples
These examples show how to create a site that points to a variety of system data in several different data tables. The
following areas of system data are emphasized:
Knowledge: building a versatile front-end for a knowledge base, from overview page to variations on the list
definitions used in the site.
Catalog: ideas for a business-to-consumer shopping experience that pulls a variety of items and forms from your
service catalog.
Service Portfolio: using the business service portfolio to contain all defined services offered by your
organization.
Featured reports: methods for linking to the most important reports.
66
67
For example,
com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=66c313e7c0a8016b008ebe1a8e3d97f5&sysparm_nameofsta
links to the Ask a Question record producer.
If you need to link to a page in an existing intranet system, this attribute can be useful.
Menu Sections
Menu sections define groups of links and how the links behave. For example, link behavior determines which page
opens when the link is clicked and how it opens (such as in a new page or a new frame).
To view a sample menu section:
1.
2.
3.
4.
5.
Before proceeding to the links themselves, it is important to mention content links in the CMS. Menu items are
similar to content links except they are called by the list block, not as part of a navigation menu block. Menu items
and content links function the same as far as how they are defined and the options available for linking to items
within the ServiceNow system. Content links are meant to be called through a list block that calls the Content Link
[content_link] table. Content links do not have the Logged in field or the Roles option that can be very useful for
controlling the UI experience for various roles defined in the system.
68
69
Business Services links to a content page (CMS page referenced: Business Service Portfolio, URL:
business_service_category.do) that pulls the system service catalog homepage into a frame within the content area.
Each link within this section leverages the browse by category page, where you pass in the name of the category to
return results.
Featured Services links to to a content page which pulls a small subset of services into an iFrame.
iFrame URL:
com.glideapp.servicecatalog_category_view.do?sysparm_parent=d67c446ec0a80165000335aa37eafbc1&sysparm_view=
Frame name: gsft_main
Install Software URL:
catalog.do?uri=com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=10d69689c611227600ffeba41c664824
Email Account URL:
catalog.do?uri=com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=d67a86b6c0a80165009386c752cd4a09
Electronic Messaging URL:
catalog.do?uri=com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=533798810a0a0b2600f1a03593e19058
VPN RSA Token URL:
catalog.do?uri=com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=d67b099ac0a80165019d0c276b772502
Shared Storage (SAN) URL:
catalog.do?uri=com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=cedd458a0a0a0b8300c3b1e32e7a3ac2
Reporting links to a content page that pulls the reports page into an iFrame. All links within this menu leverage
homepages in the system, which creates an issue with the home.do URL. Notice in the links below that ../ is used to
create a relative URL outside of the CMS site home.do definition. Without this, the site homepage would render
within the iFrame.
iFrame URL: report_home.do
Frame name: gsft_main
Cost Management Overview URL:
../home.do?sysparm_userpref_homepage=fa81ae91c0a805c64c0942ab2e4b852b
70
iFrame Methods
The following examples show how system records are pulled into an iFrame that is placed on a content page. For
system lists or forms, use the frame name gsft_main so that click-throughs work properly.
Order Hardware is an example of linking to a catalog category.
URL:
com.glideapp.servicecatalog_category_view.do?sysparm_parent=d258b953c611227a0146101fb1be7c31&sysparm_view=
Frame name: gsft_main
My Aprovals List is an example of linking to a list with a view filter and a JavaScript that reference the
authenticated user.
URL:
sysapproval_approver_list.do?sysparm_query=approver=javascript:getMyApprovals()&sysparm_view=ess
Frame name: gsft_main
Service Catalog Home Page (system) references the system catalog page within the Service Catalog application.
If you are satisfied with the way the catalog looks in the system and do not want to make a change, this is an easy
way to bring the page into a CMS design.
URL: catalog_home.do?sysparm_view=catalog_default
Frame name: gsft_main
Problem Management Overview references a homepage. The ../ is added to make the URL string relative to
system homepages; without it, the URL string would always resolve to the default CMS homepage reference in
the site.
URL: ../home.do?sysparm_view=problem_overview
Frame name: gsft_main
<br/>
<tr>
<td class="cms_knowledge_list_image">
</div>
</j:if>
</td>
<td width="100%">
<span class="cms_knowledge_list_link">${current.short_description}</span>
</a>
<p class="kb_description">
"${current.description}"
71
<!--${SP}-${SP}<span class="cms_knowledge_list_author">${current.author.first_name}${SP}${current.author.last_name}</span>-->
</p>
</td>
</tr>
<tr>
<p class="kb_learn_more">
</p>
</td>
</tr>
</table>
</g:for_each_record>
</div>
</j:jelly>
References
[1] http:/ / www. nytimes. com/ pages/ todayspaper/ index. html
[2] http:/ / www. cnn. com/ WORLD/
is configurable
adheres to best practices in self-service design
illustrates theme use
follows corporate design guidelines
ESS Portal use is typically based on the people using the data within your system and how easy it is to train them.
Self-service users can make requests, view articles, log incidents, interact through live feed or chat, and search the
knowledge base through a user-friendly website.
For those who have been using the Content Management System (CMS) for years, the ESS Portal may be new. CMS
initially started out with two site demos: Austere and Visionary. While the initial site demos were useful, they only
represented a starting point for building out extended functionality in the portal. The ESS Portal is designed as a
working portal template and a delivery mechanism for new functionality. New ESS Portal functionality is added
continuously throughout the development cycle. Substantial efforts by the ServiceNow community have allowed us
to roll good designs back in as demo data for public use by the entire community.
By default, the URL for the self-service portal is:
http://instancename.service-now.com/ess/
72
Recommended Use
If the ESS Portal meets your business needs, you have a few options. Here are some recommended use cases for the
ESS Portal:
Lightly edit the default ESS Portal site and use it.
Copy the ESS Portal to create a new site, then use the default ESS Portal as a reference guide to the new site. If
the new site needs to be heavily customized to meet your business needs, take a look at the site building
examples.
If you create your own site, working with a copy of the ESS Portal can help you understand the basic
requirements for a website. For example, at the very least a site needs a homepage, a search results page, a catalog
item detail page, and a knowledge detail page.
Making your own theme allows you to explore and edit the base system CSS without risking any changes to the
base system. Having a working example can help you troubleshoot any issues that may arise in your site building
project.
Ensure that you receive updates and new code improvements by working with a copy of the ESS Portal. Any change
you make to base system code is respected by any subsequent updates that ServiceNow pushes to your system.
Given the simplicity of setting up a new site, it makes sense to leave the ESS Portal code as a read-only master
template so you can obtain the newest functionality with just an upgrade and always have a working master system
to work from. If you would like to keep current with updated code and demo examples, use the pages and the entire
ESS Portal as read-only master templates. It is very easy to copy pages and an entire site.
73
Portal Homepage
The homepage is designed to immediately communicate the purpose of the site and provide clear paths to common
actions within the system. As plugins are activated within the system, menu items are added to the homepage along
with their corresponding detail pages. For example, notice that on the right side of the header (item 1), the chat queue
option is activated. Also notice that in the far right of the content area (item 2), at the bottom of the "Get Help"
menu, the "Live Feed" link is active (turned on when the "Live Feed" plugin is activated).
74
The super menu was coded in the CMS as part of the ServiceNow corporate website project. It is used here to
provide a useful secondary menu with minimal impact on the interface. The super menu was created to show
common self-service actions near the displayed user name. The links themselves point to pages that use iframes to
pull in the corresponding data. For more information, see the discussion of iFrames.
One of the unique qualities of the super menu is that it allows you to embed menus within menus. While the super
menu is similar to the other base system menus and is comprised of menu sections and menu items, the main
difference is that menu sections can contain another menu. This enables the designer to group larger menus together
in a hierarchical manner. Another noticeable difference from the other menus is the introduction of the header and
the footer fields on the menu form (which it only shares with horizontal blocks menus). These fields allow you to
stack menus on top of menus. Once you get a feel for the possibilities, you can see the many design options. For a
more advanced example, see Active Super Menu.
Here is the functional breakdown of the items in the menu:
CMS Administration is a useful page. Currently, there is an administration (navigation) menu that points to
many related wiki articles, descriptive menus for all blocks and navigation menus, and a prototype for passing
dynamic categories. In the future, this page will be the gateway to new functionality and community examples in
the CMS. This portion of the ESS Portal is described in greater detail in the Site Administration section.
75
76
Notice the four page reference fields in the left column of the site record.
These pages are the first steps in understanding page templates and defining site defaults. View the Pages related list
at the bottom of the site record; it is sorted by layout. Notice that three pages have a layout specified and all of the
others are blank. This shows that thought has been put into the common design of the site, not just the exceptions.
First, design for what is common throughout the site, not for the exceptions. One of the biggest beginner design
mistakes is to put the majority of effort into the homepage, leaving the design of all supporting pages as an
afterthought.
77
78
79
80
Selecting a category navigates to another page that pulls the corresponding category list of items into an iFrame. The
Cart displays for the first time within the flow of the ordering process. There are two types of links on this page:
Links within the iFframe (catalog items) whose click-throughs are handled because they are contained within an
existing iFrame .
Dynamic List links in the left column. This list pulls knowledge articles and record producers created in the
service catalog. Hover over the Delegate roles to group member link and you will see something similar to:
catalog.do?uri=com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=1bc632740a0a0b1f00
The detail page URL is catalog.do and this page is passed the ID of the record producer. Details are given in the Get
Help Example.
Selecting a catalog item from the list displays the catalog detail with a shopping cart for making requests.
81
82
On this page, the individual links in lists all use the URL that is defined in the Summary Template field of the
Content Type form. This is similar to the catalog example above, but calls a different detail page, knowledge.do.
knowledge.do?&sysparm_document_key=kb_knowledge,3b0fccee0a0a0b9b00d34b36ea41a43e
Open this page in edit mode and click the pencil on either of the lists stacked in the left column. The Type field
identifies the list definition that is an extension of the summary template for the content type. The
g:content_summarizer call pulls in the summary code. This shows where you can override the summary
definition by placing similar code where this call is located. That is the power of list definitions.
<?xml version="1.0" encoding="utf-8"?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div class="content_list_container">
<div class="content_list_title">${jvar_title}</div>
<div class="content_list_menu_items">
<ul>
<g:for_each_record file="${current}" max="${jvar_max_entries}">
<li>
<g:content_summarizer content="${current}"/>
</li>
</g:for_each_record>
</ul>
</div>
Looking at the knowledge article details, note that it is essentially the same formatting as defined in the rest of the
system. It is important to have the rating and feedback as part of the default detail display so that users can give
feedback, including comments and ratings, about the article. If you need to remove anything from this detail, remove
it from the detail field of the kb_knowledge content type.
83
84
Our Website
Overview
Early in 2011, the ServiceNow corporate website was rebuilt with the Content Management System. The goal was to
have the website live by the Knowledge11 User Conference in May 2011. The marketing team evaluated the CMS
and presented a vision, a list of requirements, design specifications, and new content. In many ways, the project
pushed the boundaries of what we thought possible in the CMS. We also discovered a few common obstacles in the
CMS. Some of the innovations resulting from the project made the CMS application a more stable and robust
offering for customers.
On the live ServiceNow corporate website many elements worked together. The Development, Human Resources,
Marketing, and Documentation departments actively edit the website. Development works within the structural
portion of the website and evaluates website enhancement requirements to see if they should be made publicly
available. Other departments work within the processes defined in the Knowledge Management System.
The structural framework is defined in the CMS. The maintenance skills required are advanced knowledge of
XHTML, JavaScript, CSS, and cross-browser compatibility.
The majority of the copy is defined in the knowledge base. The vision to utilize Knowledge Management was not
just to create an in-house ITIL knowledge base, but to provide the content managers and writers with an easy way
to maintain the copy. With basic document template training, members of the Human Resources department can
manage the entire lifecycle of job postings within the site. Members of the Events team can manage the news and
events portion of our website.
Videos are hosted on a third-party service that specializes in optimized streaming content. An outside video firm
and in-house video editors edit the videos.
85
Our Website
86
Depending on the data or database tables you plan to use, you might also need detail pages that are defined by
content types (also defined at a site level).
Knowledge detail page - used to display the full knowledge article detail (mandatory for the site).
Incident page - detail page for the incident record.
Catalog page - detail page for all items, content items, order guides, and record producers.
Our Website
87
Copy the parent pages to create all child pages, using common blocks where possible and page-specific blocks
where needed.
The Top menu resides in the row above the logo and uses only menu sections to create a single level menu
structure.
The Bottom menu resides below the logo and uses the super menu type.
A dynamic content block is within this dropzone in case script includes need to be added late in the design
schedule. When expecting the unexpected, having a dynamic content block in each dropzone of a template can
save time in the long run. Adding a block to a page is easy, but when there are 100 pages, it becomes a time
consuming task. See the use case example for a possible global js dynamic content block in this article.
Our Website
88
3. Page Content
Both static and dynamic CMS blocks are dependent on the nature of the content.
Use static blocks when content managers and writers have entry-level HTML knowledge. For example, job
postings (knowledge articles created with the system HTML editor) are managed by members of our human
resources department with no HTML experience. We provided a template and a brief explanation of the process.
Use dynamic blocks for blocks that need to use scripting or pull from the system backend. Anyone that edits their
own HTML, Jelly, or Javascript may find the HTML editor in the static block limited. The HTML editor can also
add tags or formats that advanced coders find unnecessary.
4. Right Column
Using data from the page table, the right column displays a different graphic based on the parent page (divided into
the six sections of the bottom header menu) and even at the page level if necessary. Initial designs had the right
column content change almost on every page, so code was put in place to allow these type of changes in a single
block. We ended up using consistent content within the right column because it fit the site design.
The most important actions of the site were defined and added as buttons within this column.
Once again, it is a good idea to place a global dynamic content block and a section-specific dynamic content
block as placeholders within your master template. They can always be removed, but adding them to an entire site
is tedious.
Our Website
89
7. Footer
Redundancy with menus can be good. We have yet another menu in the footer, along with a standard corporate
website copyright notice.
Our Website
90
Our Website
91
Code Examples
1. Header Example Code
This dynamic content block needs to be active and have the Two phase option selected. The g:requires tag is
including the UI script defined in the system whose name is servicenow.website.globals. The file extension in the
call is .jsdbx and is used only in the call to the UI script, not in the script name in the system. For JSDBX, the file
being called is a JavaScript(.js) defined within the database (db) that needs to be cached (x).
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
</j:jelly>
Our Website
92
<j:if test="${current_page.getName()=='Solutions'}">
<p class="page_description">
${current_page.getDescription()}
</p><br/>
</j:if>
<p class="page_description">
${current_page.getDescription()}
</p><br/>
</j:if>
</j:jelly>
TD.layout_content_submenu_column DIV.cms_menu_section_blocks {
width: 156px;
height: auto;
float: left;
position: relative;
border-style: solid;
margin: 0px 0px 0px 0px;
border: 0px solid #e0e0e0;
padding: 0px;
background: none;
padding: 24px 12px 0px 12px;
}
Our Website
93
TD.layout_content_submenu_column DIV.sub_menu_section {
width: 156px;
height: 20px;
float: left;
border-style: solid;
border: 0px solid #e0e0e0;
padding: 0px;
background: none;
padding: 0px 12px 0px 12px;
}
SPAN.cms_sub_menu_list_link, TD.submenu_cell A
color: #FFF;
}
TD.layout_content_submenu_column IMG.menu_bullet{
display: none;
}
TD.layout_content_submenu_column a.cms_menu_block_item {
margin:0;
padding: 0px;
font-size:11px;
color:#FFF;
}
TR.layout_content_submenu_row TD.layout_content_submenu_column{
background: transparent url(sub_menu_background.gifx) repeat-y
center top !important;
}
Our Website
94
<br/>
<tr>
<td class="cms_knowledge_list_image">
</div>
</j:if>
</td>
<td width="100%">
<span class="cms_knowledge_list_link">${current.short_description}</span>
</a>
<p class="kb_description">
Our Website
95
"${current.description}"
<!--${SP}-${SP}<span class="cms_knowledge_list_author">${current.author.first_name}${SP}${current.author.last_name}</span>-->
</p>
</td>
</tr>
<tr>
<p class="kb_learn_more">
</p>
</td>
</tr>
</table>
</g:for_each_record>
</div>
</j:jelly>
p.cms_menu_separator {
border-top:1px dotted #ccc;
margin-top: 6px;
margin-bottom: 6px;
}
Our Website
96
a.cms_menu_block_item {
margin:0;
padding: 0px;
color:#999;
font-size: inherit;
}
/*******************************************************************************************
SUPER MENU VARIATIONS FOR HORIZONTAL MENUS - Section Blocks Menu
(cms_menu_section_blocks UI Macro)
*******************************************************************************************/
TD.cms_header_bottom_menu .cms_menu_super_menu_bar { /*style the super
menu drop down bar */
z-index: 199;
float: left;
background: none;
margin-left: 44px;
}
TD.cms_header_bottom_menu div.cms_menu_section_blocks {
width: 200px;
float: left;
border: 0px;
margin: 0px 0px 12px 0px;
padding: 0px;
background: none;
}
TD.cms_header_bottom_menu p.cms_menu_separator {
border-top:0px dotted #ccc;
margin-top: 0px;
margin-bottom: 0px;
}
TD.cms_header_bottom_menu
.cms_menu_super_menu_bar_item {
/*style an
Our Website
97
float: left;
padding-left: 12px;
padding-right: 12px;
padding-bottom: 8px;
padding-top: 4px;
cursor: pointer;
cursor: hand;
font-weight: bold;
color: #000;
border-left: 1px solid #FFF;
border-top: 1px solid #FFF;
}
TD.cms_header_bottom_menu
.cms_menu_super_menu_bar_item_selected {
TD.cms_header_bottom_menu
.cms_menu_super_menu_content { /* style
Our Website
offX=5, offY=5, positive=true);
}
TABLE.super_menu_video_table {
background: #787878 url("grey_background.pngx") repeat-y scroll
center top;
width: 184px;
}
98
99
In addition to solving our biggest concern (width of the content), the viewport tag has more options to try:
width - The width of the viewport in pixels. If width is not set, it defaults to a desktop size (980px on mobile
Safari).
height - The height of the viewport in pixels.
initial-scale (0 to 10.0) - A multiplier that sets the scale of the page after its initial display. Safe bet: if you need
to set it, set it to 1.0. Larger values indicate that the view is zoomed in; smaller values indicate that the view is
zoomed out.
minimum-scale (0 to 10.0) - The minimum multiplier the user can zoom out to. Defaults to 0.25 on mobile
Safari.
maximum-scale (0 to 10.0) - The minimum multiplier the user can zoom in to. Defaults to 1.6 on mobile Safari.
user-scalable (yes/no) - Inidicator of whether users are permitted to scale (zoom) in/out. Defaults to yes for
mobile Safari.
Mobile Layout
For the mobile site, most of the layout work had already been done and coded in the main site. The majority of the
work needed was layout-based and CSS-based. You can see how simplistic the mobile approach is by looking at the
code for the layout. The only reason for using three separate rows within this single column layout was to change the
look of the menus, if needed, depending on what row the menus were in using CSS.
<?xml version="1.0" encoding="utf-8"?>
<j:jelly trim="true" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
CSS Handling
When you browse your site on a mobile device, you will notice that the only CSS being referenced is a file named
mobile_theme.css, even if you have a theme defined at the site level. The workaround is to load the CSS in a
dynamic content block, call it from a macro, or if you want it cached, call it as a UI script within the system the same
way you call large JavaScript libraries. One method that works is to use a theme while you are building the site, test
with browsers and a tablet if necessary, and then call the CSS when you begin device testing.
100
3. Navigation Menu
Because of the limited real estate in mobile resolutions, a few extra menus were created to increase mobile usability.
The menus needed to present the actions available to the user as defined by the owners of the site.
Solutions - goes to another menu that provides an overview of the basic application set.
Customer Success - goes to a dynamic list of knowledge articles defined in the system.
News and Events - goes to another menu that specifies the different areas within News and Events. Each one of
these links in turn links to a corresponding page that has a dynamic list populated by the knowledge base.
Documentation - goes to another menu that links to the main sections of the ServiceNow Wiki. We decided to
open these links in new pages so that viewers could maintain their path in the site.
Locations - opens a page with a single static block that lists all of the contact information for ServiceNow global
offices.
The menus are all placed within dropzone100, because dropzone100 resides below the content on all sections of the
site. If future design decisions affect the content, the menus will not be affected.
101
References
[1] http:/ / www. service-now. com
Here are a few reasons why master templates are so useful when creating CMS sites:
Rapid, no-risk page copying. Creating new pages from the master template saves you the work of creating the
same elements over and over again.
Working restore point for pages within the system. Always have a working template available if something
goes wrong in one of the blocks or in the theme CSS. It may be easier to start over using the template, instead of
troubleshooting complex changes.
Functional reference for any and all editors within the site project. Referring back to the master template
ensures that pages continue to conform to the style guide.
The base system sites and their associated files serve as good master templates.
For administrators new to the CMS, the base system sites provide pristine working restore points and reference.
It is easy to copy the base system pages and restyle them to match your requirements.
102
Building a Layout
Within the ServiceNow platform, a layout defines where you can place elements on a page and the width of space
they can occupy. Layouts are used within the content management system and for homepages. For the knowledge
management site, the first step is to build the layout that arranges the content.
This example shows a common layout used in site design that employs a header with a narrow left column for
navigation and a wide center column for content. The layout is built with a basic HTML table that is within a div
container. The class definitions abstract any rendering details in order to leverage CSS rules within a theme. In this
example, the container div centers the interface, and the left and right content areas adhere to specific
measurements. Remember to look up the dimensions of the corporate layout in the corporate design style guides.
For more information on layouts, see Defining a Layout.
<div align="center" class="layout_container">
</div>
103
Building a Theme
Themes are a collection of CSS files. The Lab theme, used in the example, consists of a base style sheet and a
separate style sheet specific to the tab interface on the entry page. The information is in two different style sheets
mostly for organizational purposes, but also to allow for sharing styles between themes without code duplication.
Because the tab interface is common to another theme, all of the rules associated with the widget are contained
within a single style sheet.
Lab - Base Styles is the style sheet that defines the classes referenced in the layout. This is important because the
layout classes are portions of the theme that are defined in order to set column dimensions and gutter widths.
DIV.layout_container{
margin: 0px;
padding: 0px;
width: 100%;
height: 100%;
}
td.content_left{
width: 192px;
border-right: 12px solid #FFF; /***creates the separation gutter
between the left and right columns***/
white-space: normal;
vertical-align: top;
}
td.content_right{
border-right: 12px solid #FFF;
width: 808px;
vertical-align: top;
}
104
105
Lab 0 Header
This block can be either a static or dynamic content block because it will simply hold a single image. This example
uses a dynamic content block.
To create the header
1.
2.
3.
4.
5.
6.
Some navigation within CMS sites revolves around generating lists of links. This example creates a basic site map of
the existing pages within the site, by calling the Page [content_page] table. To figure out the basic arrangement, look
at the choices in the Order and Order Direction fields.
For more advanced control over list rendering, use the Type and Frame fields. These settings can be used alone or
together for control over lists in the system.
Other discussions on content management stress the importance of organizing the site URL suffix and page Name
fields to establish and maintain a meaningful URL in the browser address bar. This example takes this one step
further and leverages the Name field within a page record as the title of the page.
106
<p />
<br/>
<form name="content_search" id="content_search" action="content_search.do" method="post" style="padding-left:5px; padding-bottom:10px;">
<input type="HIDDEN" value="${current_page.getSiteID()}" name="sysparm_current_site"/>
<span class="globalSearch contextSearch" >
<g:text_search_widget size="130"/>
</span>
</form>
<br/>
107
document.getElementById(id).style.display = visibility;
function setButtons(id){
document.getElementById("most_helpful").className="tabs_top_search";
document.getElementById("most_read").className="tabs_top_search";
document.getElementById("newest").className="tabs_top_search";
document.getElementById(id).className="tabs_top_search_active";
</script>
<div style="background-color=#FFF;">
<div style="clear:both;"></div>
</div>
The defined CSS rules are referenced by this code. The CSS visibility attribute is set by default to
display:none; while the JavaScript toggles the value from "none" to "inline".
div#helpful_kb, div#most_read_kb, div#bookmarked_kb, div#newest_kb,
div#solutions_kb{
display: none;
}
Notice that both the Type and Frame fields are defined in this list record. This is important because both of these
fields call macros used to wrap markup around the list itself. This demonstrates how to use the Type and Frame
fields for more control over the list.
108
109
110
111
112