Support for MVC4 display modes?

Jun 16, 2014 at 2:16 AM
Are there any plans to add support to the view engine for the MVC4 display modes (for .Mobile.cshtml views etc)? I took a quick look at the code and it does not seem to support it at the moment, but this is a feature I will be needing. If there is nobody working on it right now, I might take a stab at adding that support myself.
Coordinator
Jun 16, 2014 at 5:06 PM
@KendallB, although I haven't tested it working, we derive from VirtualPathProviderViewEngine and don't do anything as part of FindView which is primarily where the VPPVE does the DisplayMode lookup. https://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Web.Mvc/VirtualPathProviderViewEngine.cs. Odds are it might just work.
Jun 16, 2014 at 5:27 PM
Ah, you are correct! For some reason I was looking at the source and was expecting it to derive from RazorGenerator, but you are right in that all the mobile stuff is handled in the base class. I will give it a test :)