Recent Articles Widget

Our Recent Articles Widget allows you to display a reader's five most-recently-viewed articles, topic display categories, and custom content categories. These links can help readers return to content where they left off, or content they frequently reference. Your home page is an excellent place to add this widget, though you can also add it to the right column of your layout, if you're using the right column.

Note: this widget only works with individual reader accounts. Public knowledge bases, shared passwords, or shared IP addresses will not populate this widget.

How does it work?

To set up, you'll add the merge code for the widget where you'd like the information to be displayed. Behind the scenes, KnowledgeOwl will track the five most recently viewed articles, topic display categories, and custom content categories for each reader, and display those back to the reader in the widget.

Sample Recent Articles widget

Articles are displayed with a document icon; topic display and custom content categories are displayed with a folder.

The Recent Articles widget will not list:

  • Default categories
  • Blog style categories
  • URL redirect categories
  • Articles set with URL redirects 

With topic display categories, if you have the option set to Override Article Links (so that opening an article always opens it within the topic display category), when a reader views an article in the category, both the topic display category and the article will appear in their recent articles list.

Setup

To set this up, add this merge code into either Knowledge Base > Home Page or into the Custom HTML of the relevant layouts:

[reader("recent-articles")]

Different setups are discussed further below.

Add the Recent Articles Widget to your home page

There are two ways to do this, depending on how your knowledge base is set up. If you're using our default home page:

  1. Go to Knowledge Base > Home Page.
  2. Copy one of the other home page widgets and paste it in again.
  3. Edit it to have the title you'd like and replace the merge code with:
    [reader("recent-articles")]
  4. Save.

Your home page might now look like this:

Sample Knowledge Base > Home Page layout with Recent Articles widget added

Add the Recent Articles Widget to all articles

You can place the recent articles merge code in the HTML of all articles. To do so:

  1. Go to Settings > Style
  2. Click on the Custom HTML tab, and select Article from the dropdown.
  3. Click the Select a Merge Code dropdown. Find the Widget Merge Codes section and click on Recently Viewed Articles List.
  4. This will display the merge code. You can either copy and paste it where you like, or put your cursor where you'd like in the Custom HTML and click the Insert button.
  5. You can place the merge code one of two places:
    1. After the article body merge code (will place it at the bottom of the article, but above the horizontal line in our default themes):
    2. In the hg-article-footer div (will place it at the bottom of the article, below the horizontal line in our default themes:
  6. You'll probably also want to add a header to display above the recent article links and perhaps a div with a class so that you can style the recent articles widget. You can see I included a "recent-articles" class in both examples, and a header level 3 title "Recently Viewed Articles".
  7. Once you're done adding and styling the widget, be sure to Save.

Add the Recent Articles Widget to individual articles

If you only want to display the recent articles widget in certain articles, we recommend creating a snippet that includes the recent articles widget and whatever additional formatting you'd like, and then adding that to the individual articles where you'd like the widget displayed.

This helps standardize the appearance of the widget, regardless of where it's added.

To do so:

  1. Go to Library > Snippets.
  2. Click the + Create New Snippet button.
  3. Give your snippet a Snippet Name and Snippet Description.
  4. In the Content, create the layout you'd like for the widget (usually a heading, etc.). Add the merge code into it. Here's a sample:
  5. Once you're satisfied with your snippet, click Create.
  6. With the snippet created, you can add the snippet into any article using the Insert Snippet option in the editor.

Add the Recent Articles Widget to the right column of your Knowledge Base

Finally, you might decide to display the Recent Articles Widget in the right column of your knowledge base. To do so:

  1. Go to Settings > Style.
  2. Click on the Custom HTML tab and select Right Column from the dropdown.
  3. Click the Select a Merge Code dropdown. Find the Widget Merge Codes section and click on Recently Viewed Articles List.
  4. This will display the merge code. You can either copy and paste it where you like, or put your cursor where you'd like in the Custom HTML and click the Insert button.
  5. Once your merge code is added, you will likely want to format it similarly to other things in your right column. We usually just copy the div for one of the other sections, paste it in, and edit it to match. Here's an example:
  6. Once you've added a heading and any other styling, be sure to Save your changes.