Technology + People + Process

Create custom widget in Sitefinity

How to create custom widget in Sitefinity

Custom widgets are designed to improve the development of controls for Sitefinity CMS. When creating new custom widgets, open a user control in visual studio ,you must override the LayoutTemplatePath property and put the path of the cutom widget. When registering the new widget in Sitefinity CMS toolbox, you must provide the whole path, as opposed to only the virtual path.

To create a new custom widget, follow these steps:
Step 1: Open your project in visual studio
Step 2: Right click on solution

sitefinity-11.png

             
add >> new project >> web > asp.net server control > give name and select where to store > click on add > right click on your project add reference > browse > select telerik.sitefinity > add > ok


sitefinity-12-(1).png


> create a folder in your project > right click on that folder > add new> code >codefile> give a name end with .ascx
>right click on that .ascx file > properties> build action is set to Embeded Resource
>Right your code what do you need.
> after that right click on your project add reference > solution > projects > check your custom widget (here mine is ServerControl1) > ok.


sitefinity-13.png


build your solution > register your custom widget to toolbox.

Download PDF


Request for Quote

Drop us a line and we'll get in touch with you as quick as we can