I added a Controller rendering inside of Sitecore, created a basic controller at my solution, added simple view.
Set up a design layout to use my Controller rendering. And i see that Sitecore make a call to my controller but it is going to endless loop. What is wrong ?
public class MyController : GlassController
{
public override ActionResult Index()
{
return View();
}
}
I've seen similar issue once. From what I remember the answer was to return PartialView
instead of View
and specify the path to the view in the method, e.g.:
return PartialView("/views/MyView.cshtml");