Quantcast
Viewing all articles
Browse latest Browse all 9076

How to convert EPiServer gadget to component

We do have old MVC based dashboard gadget something like this:

[Gadget(Name = "Gadget Name", Title = "Gadget Title",
Description = "Gadget Description",
ClientScriptInitMethod = "epi.myGadget.init")]
public class MyGadgetController : Controller
{
public MyGadgetController()
{
//Some code;
}
[GadgetAction(Text = "List of Activities")]
public ActionResult Index()
{
var activities = GetActivities();
return View(activities);
}
[GadgetAction(Text = "List of Events")]
public ActionResult EventList()
{
var events = GetEvents();
return View(events);
}
}

But, according to EPiServer (this), old Gadget framework is deprecated. So, I want to convert above gadget to EPiServer component. Did many reading on this and couldn't able to figure out how to do that. Specially how to hook MVC components (like views) in a component. Also how to implement GadgetAction behavior


Viewing all articles
Browse latest Browse all 9076

Trending Articles