tags:

views:

31

answers:

1

So in MVC3 beta, I'm looking for a controllable way to use a different set of display templates than those I've put in the DisplayTemplates folder.

Probably easiest to just say exactly what I'm trying to do, using stackoverflow as an example:

On the details page, you can imagine that you would have:

Html.DisplayForModel() // Uses the DisplayTemplates/question.ascx

Now on the listing page showing all the questions I want:

Html.SummaryForModel() // Uses the SummaryTemplates/question.ascx

The reason for this is I want an easy way to display various objects all in one list without having to specify in the page the actual template to use (using RenderPartial or whatever).

So looking at the implementation of DisplayForModel(), this should be a simple task - but TemplateHelper is all internal so am I missing some other hook I could be overriding, or do I have to implement my own version of this?