Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: How can i add the MediaFileSelector widget to a parameter in a Razor function?

$
0
0
If you declare a parameter of the type DataReference<IMediaFile>, you should get a parameter with the widget you need:
public DataReference<IMediaFile> ImageSource { get; set; } 
Please see the example here: http://docs.composite.net/ASP-NET/Razor/Rendering-URLs

Normally, each type of a parameter has its own default widget. Some - like strings - can have widgets other than the default one.

To experiment, you can create an XSLT function and add a parameter. Then change the type of the parameter and check what widget is set by default.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>