I'm trying to use the same control (MVC ControllerRendering) multiple times in a page type template, similar to www.launchsitecore.net/.../binding-content-and-presentation (please check Fixed Toolbar that has been used twice).
I've created a template and assigned multiple controls based on same ControllerRendering in the presentations details of template, these are using same placeholder. When I create a page based on this template I want to setup different values for the Controllers in the Content Tab of the page. At the moment it only only allows setting up content for a single control and just shows same content on all the instances of Controls that I've added.
The Controller code is as follows:
namespace Company.Website.Controllers
{
public class SharedController : SitecoreController
{
// GET: Shared
public ViewResult EmailForm()
{
ISitecoreContext service = new SitecoreContext();
Foreign_Language_Email_Block model = service.GetCurrentItem<Foreign_Language_Email_Block>();
return View(model);
}
}
}
It uses GlassMapper to get the data from the page and the View displays the values using Razor.
Not sure what I'm missing?
Please could you all Sitecore Experts help!!
Thanks