Building a web site on EPiServer 7 using ASP.NET MVC, you will probably end up with a fairly long list of blocks and pages as the site grows. EPiServer 7 follows the MVC convention of searching ~/Views/ for all views, which means blocks and pages will both be located in that folder.
I want to separate block views from page views, using the folders ~/Views/Blocks/ and ~/Views/Pages/. To customize the MVC search convention to handle these additional paths, you need to add a class deriving from RazorViewEngine, like so:
Then you need to register the engine, which you can do in the Application_Start method in your Global.asax file: