If you’ve tried to create a widget (custom control) in Sitefinity (quick how to here ) you will have noticed that as easy as it is, it does not provide for customizations/administration from the backend.
However, adding fields for the admin to use for customization of your widget is as easy as providing the control with a public property. It’s that easy!
In my case for example, I needed the administrator to be able to list a number of libraries to be ignored by the current control (the control was a custom search engine).
In order to provide the administrator with a field to input library titles, I only had to add the following to my code:
public string userDefinedLibrariesNotToBeSearched
{
get
{
return _UserDefinedLibrariesNotToBeSearched;
}
set
{
_UserDefinedLibrariesNotToBeSearched = value;
}
}
Sitefinity CMS is clever enough to surface all your properties to the “edit properties” dialog box of your widget.