More in this section

Forums / General Discussions / Custom Widget - Backend Editor

Custom Widget - Backend Editor

5 posts, 0 answered
  1. Miles
    Miles avatar
    32 posts
    Registered:
    23 Nov 2011
    23 Jan 2012
    Link to this post
    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).
  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    24 Jan 2012
    Link to this post
    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!
  3. Miles
    Miles avatar
    32 posts
    Registered:
    23 Nov 2011
    24 Jan 2012
    Link to this post
    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)?
  4. Ronnie
    Ronnie avatar
    31 posts
    Registered:
    20 Jul 2011
    02 Feb 2012
    Link to this post

    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.

  5. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    02 Feb 2012
    Link to this post
    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!
5 posts, 0 answered