Recent Articles List

For knowledge bases using individual reader accounts, our Recent Articles List displays a reader's 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 article list, though you can also add it to the right column of your layout, if you're using the right column.

This list only works with individual reader accounts. Knowledge bases with default access set to public, shared passwords, or shared IP addresses will not properly populate this list.

How does it work?

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

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 list will not show:

  • 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

By default, the reader's 5 most recently viewed articles will be displayed. You can change this to display between 1-10:

  1. Go to Settings > Basic.
  2. Scroll to the Article List Settings section.
  3. Click on the dropdown next to Recent Articles and select the number of articles you'd like the list to display (1-10).
  4. Be sure to Save your changes.

We do not add this list to any section of your knowledge base by default.

If you'd like to add it, you'll add two merge codes into either Knowledge Base > Home Page or into the Settings > Style, Custom HTML of the relevant layouts:

  • [translation("article-lists:recent-articles")]: this merge code grabs the Recent articles list heading in Tools > Customize Text > Article Lists, making it so no one has to edit the code in the future to update the title
  • [reader("recent-articles")]: this merge code generates the individual reader's recent articles list

Different setups are discussed further below.

Add the Recent Articles List to your home page (Settings > Style)

Newer knowledge bases have their entire home page set in Settings > Style. If your knowledge base uses this layout, you can follow these instructions to add the Recent Articles List there. (If your knowledge base doesn't show any article lists in Settings > Style > Custom HTML > Home Page, follow the next set of instructions!)

  1. Go to Settings > Style.
  2. Below the Preview pane, be sure Custom HTML is selected.
  3. Select Home Page from the Custom HTML dropdown.
  4. Near the bottom of the code editor, find the div with class="homepage-widgets row".
  5. Copy one of the other article lists and paste that code in again.
  6. Replace the title merge code with: [translation("article-lists:recent-articles")]
  7. Replace the list merge code with:[reader("recent-articles")]
  8. Your code should now look something like this:
  9. You can Preview your changes to be sure they look right.
  10. Be sure to Save your changes once you're done!

Add the Recent Articles List to your home page (Knowledge Base > Home Page)

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

  1. Go to Knowledge Base > Home Page.
  2. Copy one of the other home page lists and paste it in again.
  3. Replace the title with this merge code: [translation("article-lists:recent-articles")]
  4. Replace the merge code with:[reader("recent-articles")]
  5. Save.

Your home page might now look like this:

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

Add the Recent Articles List 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 Article List 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 list.
    1. For the header, I used the Customize Text merge code for Recent articles heading, so our section will always respect what's been set in Customize Text.
    2. You can see I included a "recent-articles" class for my div in both examples, which would let you write CSS to style this list differently from other lists, too!
  7. Once you're done adding the merge code, text, and any Custom CSS to style it, be sure to Save.

Add the Recent Articles List to individual articles

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

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

To do so:

  1. Go to Library > Snippets.
  2. Select the + Create New Snippet button.
    Select + Create New Snippet to begin
  3. Give your snippet a Snippet Name and Snippet Description.
  4. In the Content, create the layout you'd like for the list (usually a heading, etc.). Add the merge code for both the list and the list heading 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 List to the right column of your Knowledge Base

Finally, you might decide to display the Recent Articles List 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 Article List 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.