Convert Deprecated Gadgets to Components in #Episerver
This guide shows you how you easily can convert your obsolete MVC gadgets to Component without being a dojo guru. With or without MVC pattern.
Published 8th of June 2017
For Episerver Version 10.6
Gadgets is obsolete from CMS version 10.6
BUT Episerver provides a short cut, IFrameComponent, with which I will use to illustrate how you easily can upgrade your gadget to component.
You might think IFrame suck, but if you don’t need the Episerver context, for example in dashboard, this might be a good way. I’m planning to write a guide how do upgrade this example without IFrame, and with dojo, but we’ll see about that.
This example is for administrating users for the also obsolete and legacy Subscription system build in Episerver. It is a dashboard for listing and removing users from the subscriptions on the website.
So let’s start with legacy gadget:
Change Gadget to IFrameComponent, add URL property, and categories, remove all resources. Categories can be “cms,content,dashboard”
The URL must relate to the routing added
In this example I´m not using any view instead just returning HTML from a string. But view will work as usual. You’ll just need to add a _layouts with your resources. In my code I just inline it in the htmlstring.
Gist: https://gist.github.com/LucGosso/ec1c38d9bb7a2360fc276a693ef8dd6c CS and JS file
- The Episerver gadget framework has been deprecated and was replaced by the Episerver Components.
- How to convert EPiServer gadget to component
- Creating a component without dojo
- Gadget to Component with MVC views
- Create an IFrame Component from a Dashboard gadget
- Component to administrate subscription users in Episerver