# List widget

You use the *List* widget to display lists with list items that you created previously.

> info **PREREQUISITES**: You created at least one list with at least one list item in it. For more information, see [Lists](https://www.progress.com/documentation/sitefinity-cms/lists).

### Select lists to display

After you placed the *List* widget on your page, click the *Edit* button in the upper-right corner of the widget. In the *Edit* window, you can configure the following:

* *Which lists to display?*A custom selection of* Lists* is displayed.     To select one or more *Lists* you want to display, click the *Select* button.
* \*Filter list items by...\*Narrow down list items displayed by using:

  * *Categories…*\
    Select categories from which to display list items.
  * *Tags…*\
    Select the tags by which to narrow down list items that are displayed.
  * *Dates…*\
    Select one of the predefined time intervals or choose *Custom range…* to select a more specific time interval, in which the displayed list items must be created.

    > info  **NOTE**: You can select more than one filter and narrow down results using combinations of filters, for example by both categories and dates.
* *Sort list items*\
  By default, list items are ordered in accordance with Sitefinity CMS backend list options view. You can select a different sorting criterion:

  * *Last published*
  * *Last modified*
  * *By Title (A-Z)*
  * *By Title (Z-A)*
  * *As set manually*
  * *As set in Advanced mode*\
    To sort the list items by property that is not defined in the sort dropdown menu, you must add a new sorting expression in the designer’s *Advanced* mode. For example, to sort list items using the *Content* property of list item, navigate to *Advanced » Model* and, for *SortExpression*, add *Content ASC*. As a result, in the sort dropdown menu, the *As set in Advanced mode* option is selected by default.
* *List template*\
  Select the template you want to use to list *list items* on the webpage.

### List settings

Select one of the following:

* *Simple list*\
  The system displays all items, grouped in lists. This is a list of the titles of the list items, which cannot be clicked.

* *Expanded list*\
  The system displays all items, grouped in lists. Below each item, the system displays its content.

* *Expandable list*\
  The system displays all items, grouped in lists. This is a list of the titles of the list items. When you click a list item, the item's content is displayed.

* *Anchor list*\
  The system displays all items, grouped in lists. This is a list of the titles of the list items. Below the list the system displays the content of the items. When you click an item, the system opens its content.

* *Page list*\
  The system displays all items, grouped in lists. Thus, this is a list of the titles of the list items. When you click an item, the system opens its content on a separate page.

* *List item details*\
  Select the template you want to use to display list item's details on the webpage.

* CSS classes\
  Expand *More options* section to specify CSS file names and apply additional CSS classes to the *Lists* widget.

### Advanced settings

In *Advanced* settings, you specify individual properties of the widget:

* *DetailTemplateName*\
  Gets the template you selected in the *List item details* dropdown menu.
* *DisableCanonicalUrlMetaTag*\
  Sets a `rel="canonical"` metatag to list items. For more information, see [Locations of content items: Canonical URLs](https://www.progress.com/documentation/sitefinity-cms/locations-of-content-items-canonical-urls).
* *ListTemplateName*\
  Gets the template you chose in the *List items template* dropdown menu.

### Model settings

Model settings display all properties directly bound to the *List* widget model. Access these properties by clicking the *Model* button in *Advanced* settings.

<table>
<colgroup><col><col></colgroup>
<tbody>
<tr>
<td>

<strong>Setting</strong>

</td>
<td>

<strong>Description</strong>

</td>
</tr>
<tr>
<td>

<em>DetailCssClass</em>

</td>
<td>

Gets and sets an additional CSS class to the detail view of a list item.

</td>
</tr>
<tr>
<td>

<em>FilterExpression</em>

</td>
<td>

Filters lists items based on an additional filter expression.

</td>
</tr>
<tr>
<td>

<em>ListCssClass</em>

</td>
<td>

Gets and sets an additional CSS class to the list view.

</td>
</tr>
<tr>
<td>

<em>ProviderName</em>

</td>
<td>

If you have more than one providers added, you can use a lists providers different than the default one. To do this, specify the name of this provider.

> info **NOTE**: If you leave this property value empty, the default lists provider is used.

</td>
</tr>
<tr>
<td>

<em>SerializedAdditionalFilters</em>

</td>
<td>

In case lists items are filtered based on a date, tags, or categories, the IDs of the selected filter criteria are serialized and populated in that field.

</td>
</tr>
<tr>
<td>

<em>SerializedSelectedItemsIds</em>

</td>
<td>

In case lists items are items you specifically selected, the IDs of the selected lists items are serialized and populated in that field. For example: `["3f47d0b8-2d22-6e58-888c-ff0000bfc4e0"]`

</td>
</tr>
<tr>
<td>

<em>SortExpression</em>

</td>
<td>

Adds additional sorting expression for the lists items. The default value is `Ordinal ASC`.

</td>
</tr>
<tr>
<td>

<em>UrlKeyPrefix</em>

</td>
<td>

Gets or sets the URL key prefix. Used when building or evaluating URLs for paging and filtering.

</td>
</tr>
</tbody>
</table>
