I followed this tutorial to customize my partial views locations. http://www.leonamarant.com/2011/02/17/adding-a-custom-directory-to-razor-view-engine-partial-view-locations-in-asp-net-mvc3/
Everything is ok except one thing : define a custom location with a controller name.
Here is my locations :
private static string[] customLocations = new[] {
"~/Views/{1}/{0}.cshtml", // It does not work
"~/Views/Shared/{0}.cshtml", // It works
"~/Views/Home/{0}.cshtml" // It works
};
In my view, I just add this line and the partial view is not found :
@Html.Partial("Test/_MyPartial")
I know that I could write a relative path to resolve my problem but this line does not require my class "MyViewEngine.cs"
@Html.Partial("../Test/_MyPartial")
How can I bind my controller name with the {1} ?