# News selector

This tutorial demonstrates how to add a *News* selector in a widget's designer view.

> info  **PREREQUISITES**: You created at least one *News* item, so that the selector can use it. For more information, see [News](https://www.progress.com/documentation/sitefinity-cms/news).

To add a *News* selector, in your `DesignerView.YourView.cshtml` file, place one of the following tags anywhere in the HTML code:

Single item selection:

```Razor
<sf-list-selector sf-news-selector sf-multiselect="false" sf-sortable="true"
                                 sf-provider="properties.ProviderName.PropertyValue"
                                 sf-selected-item-id="properties.SelectedItemId.PropertyValue" 
                                 sf-selected-item="properties.SelectedItem.PropertyValue"></sf-list-selector>
```

Multiple items selection:

```Razor
<sf-list-selector sf-news-selector sf-multiselect="true" sf-sortable="true"
                               sf-provider="properties.ProviderName.PropertyValue"
                               sf-selected-ids="properties.SelectedItemIds.PropertyValue" 
                               sf-selected-items="properties.SelectedItems.PropertyValue"></sf-list-selector>
```

The values of the attributes are scope properties that you define in the MVC widget controller.

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

<strong>Attribute</strong>

</td>
<td>

<strong>Description</strong>

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

`sf-selected-item-id`

</td>
<td>

Single select only. Stores the ID of the selected item.

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

`sf-selected-item`

</td>
<td>

Single select only. Stores the serialized information of the selected item.

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

`sf-selected-ids`

</td>
<td>

Multi select only. Stores the IDs of the selected items.

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

`sf-selected-items`

</td>
<td>

Multi select only. Stores the serialized information of the selected items.

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

`sf-provider`

</td>
<td>

Configures the provider to use when retrieving the items to display.

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

`sf-master`

</td>
<td>

Defines whether the selector displays news items and their statuses, such as <em>Draft</em>, <em>Locked</em>, and so on, or only published news items. To configure the <em>News</em> selector to display master items, that is, all news items, independently of their status, set the `sf-master="true"`. By default, the selector displays only live news items and the value of the `sf-master` is set to `false`.

> info **NOTE**: When you set the `sf-master="true"`, the selectors lists the items but does not display their status.

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