title: How do I implement a custom RazorViewEngine to find views in non-standard locations?
body: <p>I'm looking at implementing a custom <code>RazorViewEngine</code>. Basically I have two sites with effectively the same code base. The differences being that they look different. I want to override the standard view engine to make MVC look in two separate locations for it's views, layouts, etc. one for company A and another for Company B. Company A will contain the master views and company B's view will override these masters. So I want the View Engine to look in location B for a view, layout, master or partial if it finds it then return it, if it doesn't find it I want it to default to company A's views as the default. Obviously company A will only look in it's own folder.</p>
  
  <p>Ok to the crux of the question:
  I've found this site: <a href="http://www.aspnetwiki.com/mvc-3-razor:extending-the-view-engine">http://www.aspnetwiki.com/mvc-3-razor:extending-the-view-engine</a></p>
  
  <p>First question, is this the best way to achieve this?</p>
  
  <p><em>Second do I need to override the <code>CreatePartial</code>, <code>CreateView</code>, <code>FindPartial</code> and <code>FindView</code> methods?</em></p>
  
  <p><strong>Update</strong></p>
  
  <p>Ok I've figured out the second question myself, the Methods I want to override are <code>CreateView</code> and <code>CreatePartialView</code> as at this point it's built the view string and I can fiddle with it.</p>