Easiest Way to Find Which Module and Layout File Assigns a Content Block to a Page

actionblocksmodule

After I found out a link or image after inspect element and changing it's css.

I want to find the page and layout block to edit it's action etc, is there anyway to do it?

Since, I'm getting hard to look at every layout and since magento doesn't have php pages.

Best Answer

For this you need to follow the following steps.

1) Login To Admin

2) Navigate to System->Configuration.

3) change Current Configuration Scope to your website.

4) Navigate to Advanced->Developer which is available at the lower side of the page.

5) Under debug set Template Path Hints = yes and Add Block Names to Hints = yes and refresh the page to which you want to debug you will get a path for the phtml file and block file.

6) to find a block for ex Mage_Page_Block_Switch you need to move for the location app\code\core\Mage\Page\Block\Switch.php where Mage is the namespace / company name, Page is the module name and Switch is the block file name.

Hope this will help you.