I need to create a custom view engine which inherits the RazorViewEngine to implement the concept of sub-areas (plugin architecture).
This means that following view should be possible to obtain: \Areas\NameArea\Areas\SubArea\Views\XXX.cshtml
I have specific route data which tells about the fact that it concerns a sub area.
So if a controller returns View("XXX") the system should be intelligent enough to fetch the file at the right location.
Somewhere there should be a construction to check if it concerns a view in a sub area (through route information which is already in place) and to point to the right path in the folder.
How do I go about this?