Routers
September 14, 2009 at 10:49 am Leave a comment
Once a router has found a match of the first part of the URL to a defined frontName value from the XML, this value gets directly translated into a module name with a little adjustment to the capitalization of the words. The controller and the action names are taken from the URL as diagrammed above. If any value is missing, the defaults are taken from the core XML config via the getDefault method. When specifying a URL, you don’t always specify exactly which module, controller, and action you want to run. A request to example.com/customer/ does not fully specify which controller of the customer module, nor which action to run. If any indicators of module, controller, or action are missing from the URL the values are read from the default tag under web, then under front (default/web/front).
By default, the CMS supplies these XML values it its own config.xml file. You can change these values in the administrative back-end under the menu items System > Configuration > Web. If the XML values happen to be completely missing, the fall-back values of core, index, and again, index are used for the values of module, controller, and action, respectively.
Entry filed under: Magento Basic. Tags: Routers.
Trackback this post | Subscribe to the comments via RSS Feed