This component is used to list the articles on a Visualforce Page.

Note that only Standard Fields such as ID (string), Title (string), Summary (string), urlName (string), articleTypeName (string), articleTypeLabel (string), lastModifiedDate (date), firstPublishedDate (date), lastPublishedDate (date) of Articles are accessible to display on your page.

The syntax of this component is like this:

 <knowledge:articleList articleVar="article" categories="YOURDATACATEGORY_OPTIONAL" hasMoreVar="false" pageSize="30">  
 <table width="99%">  
  <tr>  
  <td width="33%">  
   <apex:outputLink target="_blank" value="{!URLFOR($Action.KnowledgeArticle.View, article.id,['popup' = 'true'])}">{!article.title}</apex:outputLink>  
  </td>  
  <td width="33%"><apex:outputText >{!article.articleTypeLabel}</apex:outputText></td>  
  <td width="33%"><apex:outputText >{!article.abstract}</apex:outputText></td>  
  </tr>  
 </table>  
 </knowledge:articleList>  

In above snippet,
1. table is only for making things look better and distinguished.
2. categories attribute hold string and its syntax is like DataCategoryGroup:DataCategory
    eg: Electronic:Mobile
3. pageSize attribute defines number of articles per page.

NOTE:
1. Developer Name/ Unique Names should be passed to categories attribute.
2. Max pageSize is limited to 200.

1 تعليقات

If you have any doubts, Please comment below and I will respond to you.

إرسال تعليق

If you have any doubts, Please comment below and I will respond to you.

أحدث أقدم