Solving a small but tricky problem related to customised rendering of a property in EPiServer 7 with ASP.NET MVC.
PropertyFor is the counterpart of the Property control when building websites using EPiServer 7 and ASP.NET MVC. However, it does not work the same way as the Property control and understanding how it works is key to rendering the markup that you want and need.
Perhaps the most discussed and debated question of all when it comes to EPiServer and ASP.NET MVC development is “What is the view model?” Here's my thoughts on the subject and the reasoning behind the path chosen in the Alloy templates.
Example unit tests for the MVC version of the EPiServer 7 Alloy templates available for download.
When building EPiServer websites with ASP.NET MVC the LinkURL property doesn't do us much good. Here's a couple of MVC-compatible ways for getting the URL for a page.
Utilize ASP.NET MVC's display templates to customise how EPiServer's PropertyFor method renders properties.