# Blog post selector

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

For details about the content selector, see [Use content item selectors](https://www.progress.com/documentation/sitefinity-cms/use-content-item-selectors-mvc).

> info **PREREQUISITES**: You created at least one *Blog*, so that the selector can use it. For more information, see [Sitefinity: Blogs and blog posts](https://docs.sitefinity.com/81/for-developers-blogs-and-blog-posts).

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-blog-post-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-blog-selector sf-multiselect="true" sf-sortable="true"
                                sf-provider="properties.ProviderName.PropertyValue"
                                sf-selected-ids="selectedItemIds" 
                                sf-selected-items="selectedItems"></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 blog posts and their statuses, such as *Draft*, *Locked*, and so on, or only published blog posts. To configure the *Blog post* selector to display master items, that is, all blog posts, independently of their status, set the `sf-master="true"`. By default, the selector displays only live blog posts 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>
