ThesfFileUrlField is a directive that enables you to choose a file with a certain extension from your SitefinityWebApp folder and returns the file's URL. You must pass an extension and all files displayed are with this extension. The extensions you may use are CSS, JS, and HTML. The sfFileUrlField directive is defined in a module with the same name: sfFileUrlField.
sfFileUrlField
SitefinityWebApp
CSS
JS
HTML
The sfFileUrlField directive exposes the following attributes:
sf-model
sf-extension
sf-title
sf-template-url
sf-template-assembly
The following example demonstrates how to add asfFileUrlField directive in a widget designer's view.
To enable AngularJs to link the sfFileUrlField directive in your custom designer view, you must load the script of the directive and add a dependency to the module:
DesignerView.YourView.json
JSON
designerview-<yourview>.js
.js
designerview-yourview.js
In the code above, the URL of the selected CSS is stored in the $scope.fileUrl variable.
$scope.fileUrl
DesignerView.YourView.cshtml
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