I am trying to think of a good way around a problem I'm having.
The scenario: I'm overriding a view (in my theme) whose Model object has a list of dynamic content items, which are generated in the driver using IContentManager.BuildDisplay(contentItem, "Summary"). I want to change this to use the Detail view
of the contentItem instead. I was thinking along these lines:
List<object> displayItems = new List<object>();
IContentManager manager = null; //How do I get this?
foreach(var shapeItem in Model.ContentItems)
@foreach (var displayItem in displayItems)
but as you can see from my comment I can't work out how to get an instance of IContentManager in the view. I might be going about this in completely the wrong way, if so, suggestions are more than welcome. Changing the driver is an option I suppose, but
as it's a module from the gallery, I'd have to change it each time that module was updated. It seems neater to keep the changes in my theme?