Jul 26, 2011 at 4:11 PM
Edited Jul 26, 2011 at 4:12 PM
The simplest way would probably be to create your own BaseTemplate with a property - let's call it M that is a reference to the model. The Shortest you could get it then is @M.Name. Or, you could create a base template for *all* your different models and
have all the model properties as properties on the base template and each of those properties would reference the model property of the same name.
Since the RazorParser converts directly to code it wouldn't be very easy to override any specific translation without writing hooks into the parser - not an easy task to be sure.
Take a look at the patch 8914 uploaded by me that gives the project `@model` support. You could probably extend that to do what you want. (though looking at it i don't think it's that feasible)