I am currently developing custom MVC widget. I would like to know how to add custom icon to the widget after it was dragged into a pocket?
I used a content block as a comparison to my widget which doesn't has its icon.
Please help. Thanks!
You need to change the MVCTemplateEditorRouteHandler and MVCPageEditorRouteHandler, use this:
The MVCTemplateEditorRouteHandler is public in Sitefintiy 11.
How about the anchor link that can open the widget designer, will it be added after I change the route handler?
Another approach will be to implement the interface ICustomWidgetVisualizationExtended as we do in the Image widget, Content block widget, etc. Using this interface you will need to set the IsEmpty property and WidgetCssClass. Then the CSS class will be applied only when the IsEmpty condition is met and only while you are in edit of page.