Classification widget
Overview
You use the Next.js renderer 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.
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.
Place the widget on the page
You can place a Classification widget only inside a Section widget.
To do this, perform the following:
- Inside a column from the widget, click Add widget here…
- Click the Navigation & Search tab.
- In the Search and classification section, click the CLASSIFICATION widget.
The widget is placed inside the selected column of the Section widget.
- 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.
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:
- Hierarchical classifications
For hierarchical classifications, such as Categories, you can choose between the following:
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:
- 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 Next.js pages and templates.
- 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
(Advanced settings).
- 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.
- 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.
- 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
- Save your changes.