url Routes help needed

Vote:
 

Hi

I am new to epi server cms. I am using asp.net mvc.  currently learning from http://world.episerver.com/documentation/cms/get-started-with-cms/4--adding-website-functionality/

however, I would like to know which controller,view a url is pointing to.

for example 

http://localhost:1234/Home/Index // this tell me home= controller and Index = action.

below routing tables I understand.

public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "Default",                                              // Route name
                "{controller}/{action}/{id}",                           // URL with parameters
                new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
            );

        }

 

 

#147617
Apr 20, 2016 7:37
Vote:
 

Hi,

So what is your question? You just answered it yourself in your post :) /home/index maps to HomeController and the action Index.

#147648
Apr 20, 2016 13:45
Vote:
 

routing in episerver is a bit more trickier compared to vanilla mvc. for instance, you might have "/this/is/a/page" map to HomeController that is located directly under /Controllers directory. EPiServer tries to understand incoming request, find matching page (actually content) and tries to invoke corresponding handler (controller in this case) for that request.

#147664
Apr 20, 2016 20:21
Vote:
 

There was actually a blog post published recently about routing in Episerver http://bergdaniel.se/join-me-on-a-journey-through-the-asp-net-pipeline-in-search-of-episerver-part-one

#147665
Apr 20, 2016 20:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.