IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
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:
DesignerView.YourView.jso
n
JSON
DesignerView.<YourView>.json
scripts
NOTE: For more information on the scripts that you must load, see Feather: List of selectors scripts reference.
designerview-<yourview>.js
.js
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.
propertyService
selectedItemId
selectedItem
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.
sf-selected-item
sf-selected-item-id
sf-selected-items
sf-selected-ids
DesignerView.YourView.cshtml
The values of the attributes are scope properties that you must add in your widgets controller:
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important