0
votes

I am using mvc, and I have created a controller for the custom widget which will allow the user to choose the image that they watn displayed. How do I specify this field?

I have:

public class Test: Controller { public ImageSelector Image { get; set; }

}

1

1 Answers

1
votes

You need the so called custom designer for your MVC widget.

Check this article for all the steps/details you need:

https://www.progress.com/documentation/sitefinity-cms/image-selector-mvc

UPDATE: Here is Github Gist with working code: https://gist.github.com/VesselinVassilev/31b159a1985f272e85b4ff167e59c8d8

Note: the DemoController.cs file should be in the /mvc/controllers folder the rest of the files should go to the /mvc/views/demo/ folder.