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 Customize > 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 formats the icons more consistently.
All customers with knowledge bases that pre-date this change should update their Article HTML to use the new merge code.
To do so:
- Go to Customize > Style (HTML & CSS).
- 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 class="ko-article-actions">, which usually appears after the article title's closing</h1>tag. Remove the entire span and its contents. is entire span. 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 the removed span was.
- Your HTML should now start out something like this:
- 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 to 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>