The document selector enables you to display and retrieve a specific document.
Using the document selector, you can:
NOTE: You can change the document selector's behavior by editing the widget properties in the Advanced settings section.
The document you select are kept in a scope array variable. The default template visualizes documents using the sfCollection directive. For more information, see Use a generic collection directive.
array
sfCollection
You can use the document selector in the frontend, as well as in the backend. For example, on a page, as well as in a widget designer.
The sfDocumentSelector is a directive with an isolated scope that is defined in a module with the same name: sfDocumentSelector.
sfDocumentSelector
The following image is an example of an document 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 documents and their statuses, such as Draft, Locked, and so on, or only published documents. To configure the Document selector to display master items, that is, all documents, independently of their status, set the sf-master="true". By default, the selector displays only live documents 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.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important