Link to a specific section of a Knowledge Base Article

nes
Kilo Explorer

Greetings, we store several of our policies within our Knowledge base.   The policies can be a bit lengthy and have section headings for each topic and sub-section.   We'd like to have customers be taken directly to those specific sections rather than the entire KB article and then have to search for the section.

I notice we can embed source code in the body of the KB article as well.   Is it possible to make a section heading linkable so that if we send a URL to a user they can be take directly to that section of the KB article?

Thanks,

13 REPLIES 13

Alikutty A
Tera Sage

Hi Nestor,



The knowledge articles are HTML supported and you can modify its source code to jump to a specific section using the # keyword along with anchor tag.



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


Dave Smith1
ServiceNow Employee
ServiceNow Employee

Yes. They're known as intra-page links, sometimes "bookmarks"



Within the raw HTML, you'll want to put targets in the form:



<a name="terms_and_conditions"></a>



Then embed links to these targets with:



<a href="#terms_and_conditions">Terms and Conditions can be found here</a>



If the link is contained on another page, simply prepend it with the URL first before the bookmark, e.g.



<a href="/kb_view.do?article=KB123456#terms_and_conditions">Terms and Conditions can be found here</a>



The first part should take you to the page itself; the # after to the bookmark.   If the target bookmark is missing, the visitor will simply end up at the top of the page without it scrolling down to the item of interest.


Do you know if this should work within the Service Portal?



The page scrolls to the appropriate section as you would expect, but then the scrolls back up to the very top after about 1 second, although the URL stays intact. Oddly enough, if I then refresh the page, I'm taken to the exact location I should have been taken in the first place



Thoughts?


Interesting... I'm guessing there's some onLoad script that's scrolling to the top, overriding the desired behaviour.



I'd flag it as a bug on Hi.