Question about the module HelloWorld

Sep 27, 2012 at 3:11 PM
Edited Sep 27, 2012 at 3:11 PM

Hi,

I follow the tutorial http://docs.orchardproject.net/Documentation/Building-a-hello-world-module

I would like to understand exactly the code below:

I put in comment the two other declaration from RouteValueDictionary, in that case the url should be http://localhost:30320/OrchardLocal/Helloworld/home/index

How the module knows how to redirect  http://localhost:30320/OrchardLocal/

to the right action + controler, because this url works, and use the third RouteValueDictionary.

 

            return new[] {
                new RouteDescriptor {
                    Priority = 5,
                    Route = new Route(
                        "HelloWorld",
                        new RouteValueDictionary {
                            {"area", "HelloWorld"},
                            {"controller", "Home"},
                            {"action", "Index"}
                        },
                        new RouteValueDictionary(),
                        new RouteValueDictionary {
                            {"area", "HelloWorld"}
                        },
                        new MvcRouteHandler())
                }
            };

Best regards,
Alexandre