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.

3 Answers 3


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.

  • hey mate, how come it is at app \code \core? i thought every block contains inside app\design\frontend\package\theme\template ? thanks though you're very helpful Commented May 5, 2016 at 5:52

You can just enable Template path hints. More info here

Hope this helps

  1. Search by class name in which template your link is rendered. (in all *.phtml files)
  2. Then you can search in all *.xml files for your template name to find where the block is defined with your template name. From xml file you can find which class is responsible for that block and find out what methods you can use in the template to change actions etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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