This week I would like to talk about utilizing Visual Studio to create an Ektron Plug-in Extension. These extensions will allow you to intercept certain Ektron events (i.e. on publish, on adding a new user, on form submission) with your own custom .NET code. For example, after any piece of content is deleted, you may want to perform a certain action like notify a certain folks in your department of the change. You can add your own code to do this every time the action is triggered. Make sure you have the CMS400.NET SDK installed on your development box. Then go to File -> New Project
Depending on which language you are more comfortable with, look under Visual Basic or Visual C#. In my example, I will use C#. The “Ektron Extension DLL” template will be presented to you. Give the extension a name and click OK.
You will then be presented with a number of event hooks available to you.
Select the one you are interested in and click “Next”. You’ll then be asked if you would like to “Add a reference to CMS400.NET Web Service API”. You’ll need this if you will be using Web Service Proxies.
Click “Finish” and a project will be created for you with the event hook you chose.
Add your custom code, build it, and you will find the DLL in your project’s /bin folder. Copy it into the C:\Program Files\Ektron\Plugins\Extensions folder.
The Extensibility Configuration Editor will allow you to enable/disable your plug-in extension, assign them to certain sites or all sites your computer, and view the creator and description of it.
To access it, go to Start -> Programs -> CMS400 -> Utilities -> Plug-in Configuration. Look at the screenshot below; you will be able to enable/disable any plug-in with the black stop button or the green arrow button on the top menu bar.
Now you are ready to test! Create a test piece of content and see if your custom code executes after deleting it. As a example, I simply added some code to send me an email notifying me the piece of content was deleted. These plug-in extensions are extremely useful if you want to “intercept” events before or after they occur.
Ironworks is always on the lookout for experienced professionals who believe in hard work, having fun, and great client service.