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.
The image selector enables you to display and retrieve one or several selected images.
Using the image selector, you can:
NOTE: You can change the image selector's behavior by editing its properties in the Advanced settings section.
The images you select are stored in a scope array variable. The default template visualizes images using the sfCollection directive. For more information, see Use a generic collection directive.
array
sfCollection
You can use the image selector in the frontend, as well as in the backend. For example, on a page, as well as in a widget designer.
The sfImageSelector is a directive with an isolated scope that is defined in a module with the same name: sfImageSelector. For more information, see AngularJS Isolated scope.
sfImageSelector
The following image is an example of an image selector:
In your DesignerView.YourView.cshtml file, place one of the following tags anywhere in the HTML code:
DesignerView.YourView.cshtml
The values of the attributes are scope properties that you define in the MVC widget controller.
sf-model
sf-filter
sf-provider
sf-template-url
sf-template-assembly
Defines whether the selector displays images and their statuses, such as Draft, Locked, and so on, or only published images. To configure the Images selector to display master items, that is, all images, independently of their status, set the sf-master="true". By default, the selector displays only live images and the value of the sf-master is set to false.
NOTE: When you set the sf-master="true", the selectors lists the items but does not display their status.
You can modify the settings of the sf-image-selector component directly. To do this, edit the sf-image-field.sf-cshtml file and change the following line:
sf-image-selector
sf-image-field.sf-cshtml
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