Knowledge Base Components

N.B. This article refers to the legacy application Publish, used in versions below 8.1.
In modern versions, the Pages application has effectively replaced the need for Publish.
Continue reading if you are using Publish and wish to implement this smart object.

Introduction

There are two Knowledge Base components that can be embedded into a Publish template; a "Recent Articles" component, and a "Recent Questions" component.

Please note that the image above is a generic representation of the component, and may not necessarily reflect the final product on your own intranet.

Configuration

Before proceeding, please read the overview in the Smart Objects and Components guide.

Recent Articles Component

Copy and paste the below code into a Publish template:

<!-- Recent Articles Component : usage example --> <component name="KnowledgebaseRecentArticles" class="\Claromentis\knowledgebase\component\RecentArticles">

Depending on your version of Claromentis, particularly if you're using Claromentis 8, you may need to try this instead:

<component class="\Claromentis\Knowledgebase\UI\RecentArticles">

The following attributes can be configured to determine what is displayed in the component:

limit: [int] the number of articles to return
category_ids: [int or int,int,...] shows articles from the specified category
endorsed_only: [1 or 0] shows only endorsed articles (1=yes, 0=no)

<!-- Recent Articles Component : usage example with attributes --> <component name="KnowledgebaseRecentArticles" class="\Claromentis\knowledgebase\component\RecentArticles" limit="8" category_ids="1,2,3" endorsed_only="1">

Or

<component class="\Claromentis\Knowledgebase\UI\RecentArticles" limit="8" category_ids="1,2,3" endorsed_only="1">
Recent Questions Component

Copy and paste the below code into a Publish template:

<!-- Recent Questions Component : usage example --> <component name="KnowledgebaseRecentQuestions" class="\Claromentis\knowledgebase\component\RecentQuestions">

Or

<component class="\Claromentis\Knowledgebase\UI\RecentQuestions">

The following attributes can be configured to determine what is displayed in the component:

limit: [int] the number of questions to return
category_ids: [int or int,int,...] shows questions from the specified category
unanswered_only: [int][1 or 0] shows only unanswered questions (1=yes, 0=no)

<!-- Recent Questions Component : usage example with attributes --> <component name="KnowledgebaseRecentQuestions" class="\Claromentis\knowledgebase\component\RecentQuestions" limit="8" category_ids="1,2,3" unanswered_only="1">

Or

<component class="\Claromentis\Knowledgebase\UI\RecentQuestions" limit="8" category_ids="1,2,3" unanswered_only="1">
Last modified on 17 August 2018 by Jon Mulhern
Created on 28 April 2015 by Kerensa Johnson

Was this helpful?  

0 Likes
Share