Actually I wanted to know the complete flow of a magento view. Suppose i am viewing the home page, can I ask how the flow of control goes through the PHTML, XML and PHP files , in order to view the home page? Basically wanted to know the flow of control of magento. If you have a doubt in understanding my query , please let me know.



Easiest way would be to install this module: https://github.com/fbrnc/Aoe_Profiler/
It gives you a nice tree to explore the parts of the application executed.

It still will not expose everything, as for this a complete trace of the request would be better.

to explain everything is a bit hard, as magento has a lot of layers.
If you are more interested where to add your code, it needs if you look for the event/observer system of magento and where events get triggered.

| improve this answer | |

I think the best bet to understand this is to use a debugger/xdebug. You can configure your IDE/editor to break on first line or set a break point in index.php. From there, start stepping into the code. Magento has many, many layers. I've found this approach has helped me personally more than any tutorial out there.

| improve this answer | |

Template hints with blocks are most always the first step when dissecting a magento page:


Your home page is generated by a CMS page, so the CMS->Pages in admin is going to be a good place to look for home page content.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.