- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2018 11:30 AM
Currently our system uses kb_article for viewing all knowledge basses from the service portal. I have duplicated this page and made some minor changes to the appearance of the copied page. How can get this page to be used whenever a certain Knowledge base is viewed? IE: I don't want it applied to ALL knowledge bases just the one when being viewed form the service portal.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2018 11:28 PM
Hi,
In your navigator go to: Service Portal > Portals... and select your portal.
In your portal now select your search source which you want to change and change the search page template. In one of the first lines you see the href that links to kb_article, change it to the page you desire.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2018 05:25 AM
Can someone at least confirm this is NOT possible?
Thank you...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2018 10:59 AM
I did this by adjusting the search source which is utilized by the default SP search. Search sources are not utilized by the Knowledge Portal so unsure where you are wanting this functionality.
To get started we need a place to designate which portal page to use for KB articles. I added a reference field to the Knowledgebase table called SP Page which is a reference to the Page (sp_page) table. This value will be utilized to know which page to direct the user to upon a click.
In the Knowledge Base search source, the Search page template is what is creating the template for each article found while setting the "id" of the page to use when it is clicked. I adjusted it to use a variable for the ID on the second line below since it was hard coded to kb_article:
<div>
<a href="?id={{item.display_page}}&sys_id={{item.sys_id}}" class="h4 text-primary m-b-sm block">
<i class="fa fa-book m-r-sm"></i>
<span ng-bind-html="highlight(item.short_description, data.q)"></span></a>
<p ng-bind-html="highlight(item.text, data.q)"></p>
<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>
Then in the Data fetch script, I established the value of the "display_page" variable by adding this line before results.push():
article.display_page = kb.kb_knowledge_base.u_sp_page.getDisplayValue();
results.push(article);
kbCount++;
This does require that you set the SP page value on all knowledge bases. You could adjust the data fetch script to default to "kb_article" if one is not set. Hope this helps.
Please mark this post as helpful or the correct answer to your question if applicable so others viewing may benefit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2018 11:28 PM
Hi,
In your navigator go to: Service Portal > Portals... and select your portal.
In your portal now select your search source which you want to change and change the search page template. In one of the first lines you see the href that links to kb_article, change it to the page you desire.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2018 06:23 AM
Thanks for the great answers.
The suggestion from barrilitovandijk seems much easier to accomplish.
• 7h ago