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:
<div class="hg-article">
<div class="hg-article-header">
<h1 class="hg-article-title">[article("title")]<span class="ko-article-actions"><span class="pdf" title="PDF">[article("pdf_download_tool")]</span><a href="#" class="ko-js-print" title="Print"><i class="fa fa-print fa-fw"></i></a><script>function sendEmail() {var title = 'Update your article actions merge code'.replace("'","\'").replace("'", "\'");window.location = 'mailto:?subject=' + title + '&body=' + window.location;}</script><a href="#" onclick="sendEmail()"><i class="fa fa-envelope-o fa-fw"></i></a></span></h1>
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:
- Go to Settings > Style.
- In the Customize HTML, CSS, and JS section, select Custom HTML.
- Select Article from the Select HTML section to edit dropdown.
- 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>
- Highlight that HTML and delete it.
- Copy the merge code below and paste it in where that ko-article-actions span used to be.
- So we might now have:
- Save your changes once you're done.
- If you'd like to hide any of these icons in all articles across your knowledge base, follow the instructions at Remove the PDF, print, or email icon from all articles.
[article("action_icons")]
<div class="hg-article">
<div class="hg-article-header">
<h1 class="hg-article-title">[article("title")][article("action_icons")]</h1>