The following tutorial demonstrates how to add a Site selector in your widget's designer. You use the Site selector to select different sites defined in your Sitefinity CMS application.
For more information on the scripts that you must load, see List of selectors scripts reference.
In the code above, you use the propertyService to load the properties of your widget. Next, you create a scope property to hold the Site value. You can watch for any changes in the scope to update the widget properties. For more information about getting and setting the selected item, see Use content items selectors.
In your DesignerView.<YourView>.cshtml file, place the following tag where you want to render the Site selector:
NOTE: If you do not supply a value for the sfSite attribute, the Site selector selects the default Sitefinity CMS backend site. In addition, if Sitefinity is in single site mode the Site selector is not rendered.
To access the selected site, you use the sf-site attribute. You must add the following property in your widget's controller:
The value of the sf-site attribute is the sfSite scope property, which has the following JSON structure:
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
Copyright © 2022 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity