How to make a Widget's ID appear on simple (not advanced

Posted by Community Admin on 04-Aug-2018 17:50

How to make a Widget's ID appear on simple (not advanced) designer

All Replies

Posted by Community Admin on 11-Apr-2014 00:00

By default a Widget's ID can only be set through the advanced designer/view. Is it possible to set in simple designer/view? I am using Thunder to create the designer, in case that matters.

Posted by Community Admin on 15-Apr-2014 00:00
Hi David,

You can expose the default properties which are in the advanced view to be visible in your widget designer simple view. In the designer template you should add a control for the ID, then in the js of the designer you should add the getting and setting of the ID in refreshUI and applyChanges methods.
Designer Template:
<div>
    <span>ID:</span><br />
    <input type="text" id="controlId" />
</div>

Designer Js
:
refreshUI: function ()
       var controlData = this.get_controlData();
 
       jQuery("#controlId").val(controlData.ID);
   ,
   applyChanges: function ()
 
       var controlData = this.get_controlData();
 
       controlData.ID = jQuery("#controlId").val();
   ,

I hope you find this helpful.

Regards,
Nikola Zagorchev
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 
This thread is closed