Custom Widget - Backend Editor

Posted by Community Admin on 03-Aug-2018 22:35

Custom Widget - Backend Editor

All Replies

Posted by Community Admin on 23-Jan-2012 00:00

Can anyone point me to an example of how I can create my own editor for a custom widget?

I'm thinking of the dialog that pops up when you click Edit on a widget that has been drug out onto a page (in edit mode).

Posted by Community Admin on 24-Jan-2012 00:00

Hi Miles, the widget editor is called a Control Designer, and there's a few resources available that describe exactly this, hopefully they'll get you pointed in the right direction:

“Hello World” example of a Sitefinity Widget and Control Designer.
Anatomy of a Sitefinity 4 Widget
Creating Advanced Sitefinity 4 Widget Control Designers

Hope this is helpful!

Posted by Community Admin on 24-Jan-2012 00:00

Those links helped out a lot. Thank you for the information.

So now I've gotten to a point where I want to create a Control Designer that will have a button on it that will pop-up the dialog that shows a list of all of the users for them to choose from. Then, I'd like to save the user's GUID or username to be displayed in my text box.

Where should I start to find how to call any built in UI items that Sitefinity has already built that I would be able to piggy-back off of (specifically for viewing users and/or pages that already exist in the system)?

Posted by Community Admin on 02-Feb-2012 00:00

Hello there,

I'm actually in the same boat. I’m trying to use page selector (URL) in my control designer.

I found that adding an attribute:
[WebEditor("Telerik.Cms.Web.UI.CmsUrlWebEditor, Telerik.Cms")
But not sure if this code is valid in version 4.x or just haven't found a simple sample..

If you find a better sample. I'll appreciate It.

Thanks.

Posted by Community Admin on 02-Feb-2012 00:00

Ronnie, the web editors from 3.x are indeed no longer supported. However it is possible to select sitefinity content in the current version using Field Controls. for more information and examples, take a look at this post: Selecting Sitefinity 4 Content Inside Widget Designers

Unfortunately, Miles, there is not yet a User field selector (at least not one that I am aware of). I'll send this as feedback internally so that it may be considered for a future release.

In the meantime, it may be possible to use the Sitefinity API in codebehind to populate a list that could be then use jQuery to select and save the properties to your control. the Creating Advanced Sitefinity 4 Widget Control Designers topic demonstrates how you can bind data in code behind for a widget designer.

I hope this is helpful!

This thread is closed