• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Magento routing
 

Magento routing

on

  • 3,095 views

Describes Magento 1.X routing process and shows how to create custom router

Describes Magento 1.X routing process and shows how to create custom router

Statistics

Views

Total Views
3,095
Views on SlideShare
3,084
Embed Views
11

Actions

Likes
2
Downloads
32
Comments
0

3 Embeds 11

http://vovikha.blogspot.com 8
http://vovikha.blogspot.co.uk 2
http://www.wp.pl 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Magento routing Magento routing Presentation Transcript

    • Magento RoutingFollow the Request
    • Magento RoutingZend Model: Module/Controller/Action
    • Magento RoutingZend Model: Module/Controller/ActionMagento knows this scheme very well andhow to go to the right action on the base ofrequest.Route like /contacts/index/index will work asgood as /contactsAt least result will be the same :)
    • Magento RoutingMage_Core_Controller_Varien_Front
    • Magento RoutingDispatch Routers are defined in Core config.xmlThere 2 of them by default
    • Magento RoutingAs area is Frontend lets see what Standardrouter suggests.
    • Magento RoutingAll routes are defined in xml files, thoughprogrammatically they can be defined toowith the help of observer.
    • Magento RoutingMage_Core_Controller_Varien_Front
    • Magento RoutingNow we can match route with request and dodispatch
    • Magento RoutingMage_Core_Controller_Varien_Action
    • Magento RoutingMagento Core has 3 Routers which calledone by oneAdmin -> Standard -> Default Admin - catches all admin routesStandard - catches frontend routesDefault - catches any request which was not catchedby previous two. And send customer to the default route- 404 page or home page.
    • Magento RoutingMage_Core_Controller_Varien_Router_Default
    • Magento RoutingDefault router does not do any dispatch job.It only tells $request object that it shouldfollow to the defined /module/controller/action
    • Magento RoutingStandard Router will do dispatch as now heknows where to go.
    • Magento RoutingCustom router - configure xml - put the Router into Controller/Frontdirectory(it is a convention not a rule) - use default Router as an example
    • Magento RoutingCustom router - to do less moves extend from Standard - programmatic way to add router on the flylocated in Mage_Cms module
    • Thanks- Magic "While" for Magic- Song: "Taiyou Iwaku Moeyo Chaos" for support- Stepan Tanasiychuk @stfalcon for inspiration