Open widget to a specific article

Some customers like to be able to open the widget directly to a specific article.

For this set-up, you'll need to use two methods:

  • _ko19.openArticle('article-identifier'); -- this loads the specific article you want into the widget. For the article-identifier, you can use one of two options:
    • The article's relative permalink (for example, for this article, it would be open-widget-to-a-specific-article)
    • The article's ID (found by opening the article in edit mode: the ID is the number that comes after /aid/ in the URL)
  •; --this call opens the widget

Using only the openArticle method will prime the widget to open to a specific article the next time it's opened by your user.

A good way to use this is on a specific hyperlink in your documentation, to open the widget to a specific article. In this case, you'll insert a hyperlink with an empty URL, and add two onclick events--one for each of the methods above.

So, for example, this link opens the widget directly to the article you're reading right now. Here's the code for it:

<a href="#" name="" onclick="_ko19.openArticle('open-widget-to-a-specific-article');;" title="">Open widget directly to an article</a>