Feather Role selector enables you to display a list of all existing roles defined in your website. You can use the selector in the frontend or backend of your site. For example, you can use the selector on a page or in a widget designer.
For more information about roles in Sitefinity CMS, see Overview: Roles.
In this example, you add a role selector in a widget designer's view. To add the role selector:
NOTE: For more information on the scripts that you must load, see Feather: List of selectors scripts reference.
In the code above, you use the propertyService to load the properties from the widget. Next, you create a scope property to hold the value of the selectedItemId and selectedItem. Finally, you subscribe for any changes in the scope.
NOTE: You can use the sf-selected-item and sf-selected-item-id ;attributes to access the selected value.
If you enabled multiple selection of items, you must use the sf-selected-items and sf-selected-ids attributes. For more information on multiple selection of items, see Feather: Us multiple content items selectors.
The values of the attributes are scope properties that you must add in your widgets controller:
Back To Top