I'm having a problem on calling a simple hello world plugin. (Controller Action retruns a View)
Structure:
Pacoliba.Plugin.Catalog.ProductOverview
--- Controllers
------ CatalogProductOverviewController.cs
--- Models
--- Views
------ CatalogProductOverview
--------- ProductOverview.cshtml
This is the error i'm getting using - @Html.Action("GetProductOverview", "CatalogProductOverview") on the Index.cshtml of my theme:
The controller for path '/' was not found or does not implement IController.
RouteProvider:
namespace Pacoliba.Plugin.Catalog.ProductOverview
{
class RouteProvider : IRouteProvider
{
public void RegisterRoutes(RouteCollection routes)
{
routes.MapRoute("Pacoliba.Plugin.Catalog.ProductOverview.GetProductOverview",
"Plugins/CatalogProductOverview/GetProductOverview",
new { controller = "CatalogProductOverview", action = "GetProductOverview" },
new[] { "Pacoliba.Plugin.Catalog.CatalogProductOverview.Controllers" }
);
}
public int Priority
{
get
{
return 0;
}
}
}
}
Controller - CatalogProductOverviewController.cs:
namespace Pacoliba.Plugin.Catalog.ProductOverview.Controllers
{
class CatalogProductOverviewController : Controller
{
public ActionResult GetProductOverview(){
return View("Pacoliba.Plugin.Catalog.ProductOverview.Views.CatalogProductOverview.ProductOverview");
}
}
}
View - ProductOverview.cshtml:
<div>
hello world
</div>
As you can see, it's a quite simple example because i'm just getting started on developing plugins. Does someone knows what i'm doing wrong?
Kind Regards