I have a control property with a data source pointing to a folder with items with fields.
Is there a way to loop through the children of the item in the data source and display them on my view?
In my view I have:
@using Sitecore.Mvc.Presentation
@using Sitecore.Mvc
@model RenderingModel
In my controller I have:
public ActionResult Index()
{
var renderingModel = new Sitecore.Mvc.Presentation.RenderingModel();
var myTitle = renderingModel.PageItem.Fields["Title"].Value;
var item = Sitecore.Mvc.Presentation.RenderingContext.Current.Rendering.Item;
var itemPageContext = Sitecore.Mvc.Presentation.RenderingContext.Current.PageContext.Item;
return View();
}