# Multisite page selector

The following tutorial demonstrates how to add a *Multisite page* selector in your widget's designer. You use this selector to select different pages, based on the sites and available languages defined in your Sitefinity CMS application. For more information on basic page selector, see [Page selector](https://www.progress.com/documentation/sitefinity-cms/page-selector-mvc).

[![Image title](https://www.progress.com/documentation/sitefinity-cms/assets/7bf9e80c92b586b8834c73251f00c973/multisitepageselector.png)](https://www.progress.com/documentation/sitefinity-cms/assets/7bf9e80c92b586b8834c73251f00c973/multisitepageselector.png)

## Add Multisite page selectors

To add a *Multisite page selector*, in your `DesignerView.<YourView>.cshtml` file, place the following tag where you want to render the selector:

```Razor
<sf-multisite-page-selector
    sf-site="properties.Site.PropertyValue"
    sf-culture="properties.Culture.PropertyValue" 
    sf-selected-item="properties.SelectedItem.PropertyValue" 
    sf-selected-item-id="properties.SelectedId.PropertyValue"
    sf-bind-on-load="true">
</sf-multisite-page-selector>
```

> info  **NOTE**: The dropdown menu for the culture is automatically populated with the cultures available for the currently selected site. If Sitefinity CMS is in single site mode, the site dropdown menu is not rendered.

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

| Attribute             | Description                                                                 |
| --------------------- | --------------------------------------------------------------------------- |
| `sf-selected-item-id` | Single select only. Stores the ID of the selected item.                     |
| `sf-selected-item`    | Single select only. Stores the serialized information of the selected item. |

## Get or set the selected site

To access the selected value, you use the `sf-selected-item` and the `sf-selected-item-id` attributes. The values of the attributes are scope properties that you must add in your widgets controller:

```C#
using BooksWidget.Mvc.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Telerik.Sitefinity.Mvc;

namespace BooksWidget.Mvc.Controllers
{
    [ControllerToolboxItem(Name = "Books", SectionName = "MVC samples", Title = "Books")]
    public class BookController_SelectorExample : Controller
    {

        //custom logic

        public string SelectedItem
        {
            get;
            set;
        }

        public string SelectedId
        {
            get;
            set;
        }

    }
}
```

To specify which site and culture are selected by default, use the `sf-site` and `sf-culture` attributes. The attribute values are updated as soon as the user selects a different site or culture from the dropdown menus.
