Im currently implementing MVC into a fairly large project and want to sort views into categories. MVC dont seem to understand this and Im having problems finding a clean solution. Basically I was hoping to solve this with routes, but it isnt working.
My folder structure in the project is like this:
- Controller
- SLResources
- FAQController.cs
...
- View
- SLResources
- FAQ
- (cshtml files in here)
Ive also tried adding a - FAQ folder after - SLResources in the controller folder structure.
Ive then made the following routing, with no luck:
RouteTable.Routes.MapRoute(
name: "FAQ",
url: "SLResources/FAQ/{action}/{id}",
defaults: new { controller = "FAQ", action = "Index", id = UrlParameter.Optional }
);
basically I would like to reach the FAQ by using this url: http://www.xxxxxxxx.com/SLResources/FAQ/
Is the only solutions to either create a dummy class that redirects to the proper views, or a custom ViewEngine?
Any tips?