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.
With Feather, you can implement in a widget designer a multiple items selector for various items, such as dynamic items, news items, pages, taxonomies, and so on.
To use the selector in multiple selection mode:
DesignerView.YourView.json
scripts
"client-components/selectors/common/sf-selected-items-view.js"
sf-multiselect="true"
<
sf-list-selector
sf-page-selector
sf-multiselect
=
"true"
sf-sortable
sf-selected-ids
"ids"
sf-selected-items
"slectedItems"
></
>
public string SelectedItems
{
get;
set;
}
public string SelectedIds
var designerModule = angular.module('designer');
angular.module('designer').requires.push('sfSelectors');
designerModule.controller('CustomCtrl',[ '$scope', 'propertyService', function ($scope, propertyService) {
$scope.feedback.showLoadingIndicator = true; propertyService.get().then(function (data) {
if (data) {
$scope.properties = propertyService.toAssociativeArray(data.Items);
},
function (data) {
$scope.feedback.showError = true; if (data) $scope.feedback.errorMessage = data.Detail;
}). finally (function () {
$scope.feedback.showLoadingIndicator = false;
});
$scope.$watch('properties.SelectedItems.PropertyValue', function (newValue, oldValue) {
if (newValue) {
$scope.selectedItems = JSON.parse(newValue);
$scope.$watch('selectedItems', function (newValue, oldValue) {
$scope.properties.SelectedItems.PropertyValue = JSON.stringify(newValue);
$scope.$watch('properties.SelectedIds.PropertyValue', function (newValue, oldValue) {
$scope.ids = JSON.parse(newValue);
$scope.$watch('ids', function (newValue, oldValue) {
$scope.properties.SelectedIds.PropertyValue = JSON.stringify(newValue);
}]);
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