Using the Category list web part

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The category list web part is used to display a list of enabled global and custom categories. For each of the categories, there is a number of documents in the category displayed in brackets after the category's name. If the site visitor clicks any of the categories, they will be redirected to a page containing a list of links leading to documents in the category.




The Category list always works 'in pair' with some repeater web part. When a category is clicked in the category list, a list of articles in the selected category is displayed in the repeater. The repeater can be located either on the same page like the category list, or on some other page to which the site visitor will be redirected. You can find an example of this behavior on the Corporate Site sample website, in section Examples -> Web parts -> Tagging & Categories -> Category list.




For this to work, you have to do the following property settings to the web parts:


Category list:


The placement of the repeater is defined by the Category list's Category list page property. In case the repeater is placed on the same page as the category list, the value should be left blank. In case it is placed on some other page, you should enter the alias path of that page.


ID of the clicked tag is transferred to the repeater in form of a query string parameter. The name of the parameter can be set using the Querystring parameter name property. The repeater displays the appropriate list of documents based on the value that it gets via this parameter.




Set the value of the Path parameter to the location in the content tree where the documents are stored.


Set the value of the Document types parameter to the document type(s) that is (are) to be displayed.


Select the transformations that you want to use for the Transformation and Selected items transformation.


Finally, use the following code as a value for the repeater's WHERE condition parameter. The categoryid value should be replaced by the name set in the Category list's Querystring parameter name property.


'{?categoryid?}' = '' OR (DocumentID IN ( SELECT DocumentID FROM CMS_DocumentCategory WHERE CategoryID = '{?categoryid?}' ))


Page url: