# Classification widget

## Overview

You use the ASP.NET Core *Classification* built-in widget to display lists of categories, tags, or custom classifications on your website. You then use these lists of classifications to filter the content of the pages.

> success **EXAMPLE**: If you have a list of news, some of which are news about the weather and you have tagged them with the tag weather, and some news are about the traffic and you have tagged them with tag traffic, by adding the *Tags* widget to your page, you give the users the opportunity to filter only traffic or only weather news by clicking the respective tag.

Classifications are created and managed in the *Classifications* module. You use the widget only to display them.\
For more information, see [Classify content](https://www.progress.com/documentation/sitefinity-cms/overview-classify-your-content-using-taxonomies).

## Place the widget on the page

You can place a *Classification* widget only inside a *Section* widget.\
To do this, perform the following:

1. Inside a column from the  widget, click *Add widget here…*
2. Click the *Navigation & Search* tab.
3. In the *Search and classification* section, click the *CLASSIFICATION* widget.\
   The widget is placed inside the selected column of the *Section* widget.
4. To open the widget settings, hover over the widget and click *Select classification*.\
   The *Classification* page opens.

## Select content to display

In this section, you choose the classification type to be displayed by the widget.\
Perform the following:

Choose content to display

In *Classification* dropdown box, choose between the built-in *Tags* and *Categories,* or any other custom classification that you have on your website.

For more information, see [Create custom classifications](https://www.progress.com/documentation/sitefinity-cms/create-custom-classifications).

### Filter the list of items

In *Selection range*, you can narrow down the list of classification.\
You have different choices, depending on whether you have selected a flat or a hierarchical classification.

* **Flat classifications**\
  For flat classifications, such as \*Tags,\*you can choose between the following:
  * *All tags*\
    All tags are displayed in the list.
  * *Selected tags*\
    A custom selection of tags is displayed.\
    To select one or more tags you want to display, click ![Add](https://www.progress.com/documentation/sitefinity-cms/assets/ed18f87316e449f58adc9531a6244938/add.png "Add") (*Select tags*) button.
  * *Only tags used by content type...*\
    A custom selection of tags is displayed. Only tags assigned to the selected content type items are displayed in the list.

    > info  **NOTE**: In the dropdown box, you can select only one content type.
* **Hierarchical classifications**\
  For hierarchical classifications, such as *Categories,* you can choose between the following:
  * *All categories*\
    All categories are displayed in the list.
  * *Top level categories only*\
    All top level categories are displayed in the list.
  * *All categories under particular category…*\
    All direct children of a specifically selected category are displayed in the list.\
    To select a category, click ![Add](https://www.progress.com/documentation/sitefinity-cms/assets/ed18f87316e449f58adc9531a6244938/add.png "Add") (*Select category*) button.
  * *Selected categories...*\
    A custom selection of categories is displayed. \
    To select one or more categories you want to display, click ![Add](https://www.progress.com/documentation/sitefinity-cms/assets/ed18f87316e449f58adc9531a6244938/add.png "Add") (*Select categories*) button.
  * *Only categories used by content type...*\
    A custom selection of categories is displayed. Only categories assigned to the content type items selected are displayed in the list.

    > info  **NOTE**: In the dropdown box, you can select only one content type.

## List settings

In this section, you can configure the following chip selectors:

* *Show item count*\
  The count of all items to which the classification is assigned is displayed.
* *Display empty tags or categories*\
  Classifications that are not assigned to any item are displayed.

## Display settings

In this section, choose how to display the selected classifications on the page..\
Perform the following:

1. In *Template* dropdown, you can select a template other than the default one that will be used to display the Classification widget on the website.

   You must first have created a custom template.\
   For more information, see [ASP.NET Core pages and templates](https://www.progress.com/documentation/sitefinity-cms/create-an-asp.net-core-page).
2. In *Margins,* you can choose the margins between the widget and the column where it is placed.\
   Choose from the predefined values of none, small, medium, or large.

Save your changes.

## Advanced widget settings

To open the advanced settings, in the upper-right corner of the *Classification* widget page, click ![DotNetCore11](https://www.progress.com/documentation/sitefinity-cms/assets/0b5bf6d61861bf099d7f849dde3e94ea/settings-dotnetcore.jpg "DotNetCore11") (*Advanced settings*).

1. Change the label\
   In *Label,* you can enter a specific name for this widget.  This name will be displayed in:
   * The page editor as a label for the widget
   * In the treeview with the page structure in the right pane of the page editor.
2. Apply custom CSS\
   In *CSS class* input field, you can choose a class name for the textbox, if later you want to set a CSS style for this particular textbox.
3. Change the sorting\
   By default, items are sorted in the list by publication date in descending order.

   You can also enter a custom sort expression.Use the following format: `{fieldName} (ASC / DESC)`. For example, `PublicationDate DESC`
4. Save your changes.
