Knowledge Article Attachment Link Box not working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 04:57 AM
I've read here (screenshot) that checking the attachment link box is supposed to allow you to click a link (from search) and automatically download it from the article title, without viewing the article.
Attachment link | Option for downloading an attached file automatically when a user accesses the article, instead of opening the article view. Add one or more attachments to the article to use this option. Note: You may attach multiple files, but most web browsers permit users to download only the first one. To ensure download of all the files, bundle them into an archive, such as with WinZip, and attach the archive. The Attachment link option applies to articles accessed from search links only. Articles accessed as links within other knowledge articles will not replicate this behavior. |
Display attachments | Option for displaying attachments to users viewing this knowledge article. Attachments appear below the article text. Add one or more attachments to the article to use this option. |
This is not the experience that I am getting.
What I am seeing is this:
1. I added an attachment (using Manage attachments) and clicked the Attachment link box. At first I wanted to attach the link and publish the article without adding any content to the body, but that's a required field (is that OOB or could that be custom?)
2. When I add content, like the title of the attachment link, I have to manually link the attachment in the article body or else nothing is linked.
3. When I search in the Portal, I can clearly see the article title and attachment link title, but I can't click on anything.
4. I tried clicking on the article title, but it only takes me to the article.
5. I can click the link from the viewed article, but I'm trying to download the link from clicking the article title only.
In this image, I had to link the attachment in article body, otherwise nothing was linked.
Am I missing something? I've seem some others comment that they've had the same experience, but those posts are from years ago. I appreciate any insight anyone can share!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 06:03 PM
Please check the search source attached to your portal record.
It worked OOTB for me, however my Search page template looks like below
<div>
<a href="{{item.link}}" class="h4 text-primary m-b-sm block">
<i class="fa fa-book m-r-sm"></i>
<span ng-bind-html="highlight(escapeHTML(item.short_description), escapeHTML(data.q))"></span></a>
<p ng-bind-html="highlight(escapeHTML(item.text), escapeHTML(data.q))"></p>
<div style="padding-left: 24px; font-size: small;" ng-repeat="attachment in ::item.attachments">
<span title="${Attached by} {{::attachment.sys_created_by}} : {{::attachment.sys_created_on}}" class="glyphicon glyphicon-paperclip"></span>
<a ng-href="{{::attachment.link + '&view=true'}}" aria-label="${Download} {{::attachment.file_name}}">{{::attachment.file_name}}</a>
<a href="{{::attachment.link}}" title="${Download} {{::attachment.file_name}}">
<span class="glyphicon glyphicon-download-alt"></span>
</a>
<p ng-if="attachment.terms" ng-bind-html="::highlight(escapeHTML(attachment.terms), escapeHTML(data.q))"></p>
</div>
<span class="text-muted">${Article}: {{item.number}}</span>
<span class="text-muted">
<span class="m-l-xs m-r-xs" aria-hidden="true"> · </span>
${Published}: <sn-day-ago date="item.publishedUTC"/>
</span>
</div>
and in the data fetch script I have these lines
article.table = "kb_knowledge"; // populate the table name for analytics
article.link = result.link;
<!--<a href="{{item.link}}" class="h4 text-primary m-b-sm block">--> - this is what creates the link.
also please check if the script include - global.KBPortalServiceImpl has not been modified.
Mark helpful if this helped.
Thanks,