Update your article actions merge code

Until December 2022, the icon hyperlinks next to the article header to print, email, and view the article's PDF were hard-coded HTML added to Settings > Style, Custom HTML > Article:

If you wanted to hide one or more of those options, you either needed to remove or comment out the HTML.

In December 2022, we streamlined this format by replacing all that hard-coded HTML with a single merge code:

[article("action_icons")]

This merge code proactively creates that HTML, and does so in a more consistent structure.

We suggest all customers with knowledge bases that pre-date this change update their Article HTML to use that new merge code.

To do so:

  1. Go to Settings > Style.
  2. Below the Preview Pane, be sure Custom HTML is selected.
  3. In the Custom HTML dropdown, select Article.
  4. Find the section of your article HTML that contains a span with class="ko-article-actions". You'll want to remove this entire span, which generally runs from after the article title to the </h1> tag. Here's a sample of the HTML you'll want to delete:
    <span class="ko-article-actions"><span class="pdf"></span><a href="#" class="ko-js-print"><i class="fa fa-print fa-fw"></i></a><a href="#" onclick="javascript:window.location='mailto:?subject=Update your article actions merge code&body=' + window.location;"><i class="fa fa-envelope-o fa-fw"></i></a></span>
    Here's a sample screenshot with the relevant HTML highlighted:
  5. Highlight that HTML and delete it.
  6. Click the Select a Merge Code dropdown that's just below the Custom HTML pane.
  7. In the Article Merge Codes section, select the Article Actions merge code:
  8. You can either copy the merge code and paste it in to where you deleted the HTML in step 5, or just click your cursor where it was and select the Insert button.
    If your HTML looked like ours above, the new merge code should come immediately after the article title merge code:
  9. Save your changes once you're done.
  10. If you'd like to hide any of these icons in all articles across your knowledge base, see Remove the PDF, print, or email icon from all articles.