In ASP.NET MVC 2 project, how might I go about writing a custom view engine that allows custom tokens to be used when searching for views?
Specifically, I'm trying to achieve this:
In PagesController:
public ActionResult ViewPage(string folder, string page)
{
return View(folder, page);
}
I want the view engine to search for the view in the directory: /Views/Pages/[folder]/
How might I achieve this without knowing the folder names ahead of time? Ideally, this customized view engine would only be used for this single controller.