Configuring the Categories widget

Use the Categories widget to display categories on your page. The categories are then used to filter content. By clicking different categories from the treeview displayed on the webpage, you can filter the content of the page. By using hierarchy of categories, you can filter content items according to more general or more specific criterion.

PREREQUISITES: You have created at least two categories.

For more information about when and how to use categories, see Using categories.

To configure the Categories widget, perform the following:

  1. After you have dragged the Categories widget on your page, click Edit button in the upper-right corner of the widget.
    The Edit window appears in advanced mode.
  2. In BaseUrl input field enter the URL name of the page which content you want to filter using categories.
    This page can be either the same page on which the Categories widget is, or it can also be another page.
    For example, you can display the categories on one page of your website, but if the user clicks a category, the system opens another page and filters its content.

    NOTE: You enter the URL name in the following format ~/<URL name of page>. For example, if the title of the page is About us, the automatically generated URL name is about-us (in case you have not changed it), then in BaseUrl input field you enter ~/about-us.
    You can find out the URL name of a page in the address bar of the browser, when a page is opened in content editing mode. The URL name is the name after the name of the project (http://…/<project name>/<page-name>/…) or you can see the URL name in the properties of the page. For more information, see Editing the properties of a page.

  3. To filter the items in a category according to their content type, you use input field ContentType:
    To display only:  In ContentType field, enter: 
    Blog posts  Telerik.Sitefinity.Blogs.Model.BlogPost 
    Events  Telerik.Sitefinity.Events.Model.Event 
    News  Telerik.Sitefinity.News.Model.NewsItem 
    Images  Telerik.Sitefinity.Libraries.Model.Image 
    Videos  Telerik.Sitefinity.Libraries.Model.Video 
    Documents  Telerik.Sitefinity.Libraries.Model.Document 

    For example, when you click a category and you want only events classified with this category to be displayed, in ContentType enter Telerik.Sitefinity.Events.Model.Event.

  4. Click Save.
    The system saves the setting and closes the editing mode of the widget. 
    Categories are displayed in a treeview if they have hierarchy or in vertical list if they have no hierarchy.

For more information about creating categories, see Creating a category.
For more information about how to add a category to a content item, see Adding categories and tags to a content item.

For more information about configuring other properties, see Advanced configuration of widgets.

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK