It looks like this is possible, but not without some custom coding.
http://bit.ly/sf-customLogicForSFWidgets
- Create a .class file in your Sitefinity project solution then we must find out how to inherit one widget. For this example I will be inheriting Sitefinity login control.
- To find the needed path that should be inherited (
Telerik.Sitefinity.Web.UI.PublicControls.LoginControl
) go to Administration->Settings->Advanced->Toolboxes->PageControls->Sections->Login->Tools->Login
and find textbox: Control CLR Type or Virtual Path
. In it you can take the path Telerik.Sitefinity.Web.UI.PublicControls.LoginControl
as well as other properties that will not be needed from this example.
- In the .class file created in step 1 inherit from Login Control.
- Save the file and build Sitefinity project (if the project is website project build will not be needed).
- Now register new widget that will be the modified login control.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace SitefinityWebApp.Custom
{
public class Class1 : Telerik.Sitefinity.Web.UI.PublicControls.LoginControl
{
protected override void LoginForm_Authenticate(object sender, System.Web.UI.WebControls.AuthenticateEventArgs e)
{
// Do Custom Stuff Here Before Base Call
// call base login class when done
base.LoginForm_Authenticate(sender, e);
// Do Custom Stuff Here After Base Call
}
}
}