
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2014 11:18 AM
Is it possible to modify the title attribute of a page server-side? We would like to open up some of our Knowledge Base articles to Google and the only way I know to modify the title of a ServiceNow page is using client side javascript and setting top.document.title dynamically. Does this work to change the title that Google displays in search results? If not, is there a better way? Erich Zirnhelt mentions in his blog post Enhancing KB Articles with metadata for SEO and Social Sharing that ServiceNow modifies the title on every Knowledge Base page and that Google uses the title in the search results, so this must be possible. Thanks for any ideas.
Solved! Go to Solution.
- Labels:
-
Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2014 01:56 PM
For everyone's benefit, here is the answer from Michael Wimble:
If you create a UI Macro with the name 'html_page_title', you can dynamically create on the server side the title for the page. The macro should ultimately produce the '<title>blah blah</title>' element.
If you try this client-side, search engines are not going to execute any Javascript, and will only see the raw form of the page.
I will try this and report back.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2014 01:32 PM
RP is not available, but for this limited case, you can use jelly.sys_kb_id to get the sys_id of the current KBA and use that to perform a GlideRecord query to get the data you need. See here for details Re: Re: RP is not Defined in UI Macro