0

I have a MVC project that has a number of views in the Views/Home folder to which are currently accessed as /Home/About, /Home/Contact, etc... but these are summary pages with multiple content sections on each page.

I need to link to an View/Home/Content.cshtml page to show the linked summary page in its entirety.

I'd link to replace /Home/About with /About and say the linked page as /About/Overview as opposed to /Home/Account/Content/1 is this possible?

If so could somebody please explain how I need to format ActionLink's accordingly and anything else I need to configure in the project.

Any help would be much appreciated :-)

iggyweb
  • 2,373
  • 12
  • 47
  • 77
  • Why dont you just make an About controller with different methods for each page you want to serve? – jamesSampica May 05 '14 at 17:02
  • That's a possibility, especially for a News section, but how do I get /Home/Account/Content/1 to display route as /About/Overview or /News/Article/1 to /News/Hero-Hour? – iggyweb May 05 '14 at 17:09
  • Either provide some base controllers and register routes to that controllers, with the slug as the id instead of a numeric id (http://stackoverflow.com/questions/11494184/asp-net-mvc-routing-custom-slugs-without-affecting-performance) or provide your custom RouteHandler (http://stackoverflow.com/questions/19611863/net-mvc-4-routing-with-custom-slugs) – Anderson Matos May 05 '14 at 23:37

0 Answers0