How to find block names, templates and other data in Magento
By activating the block hints, Magento will display the class name and template of a block while messing up the front end appearence.
Now, we have the class names. How do we get the actual block name? How do we find the parent/children block names?
Here is a small extension I made exactly for this:
http://www.magentocommerce.com/magento-connect/razvanmocanu-devtools.html
Once installed you’ll find a new section in admin / System / Configuration where you can set up the options.
What this extension does is add information in the HTML code about the blocks. You can view not only the block name and template file but also data contained by the block itself.
In the current version 0.0.1 you can set the following options:
- Wrapping tag: this defines which tag is used to mark the beginning and the end of each block. By default each block will be wrapped in comments and I do recommend this tag. However, wrapping the blocks in div tags allows the usage of the option to display the block template file on hover.
- Some other options: these can be used to set which information is included. All the information is included as tag attributes.
Go on, give it a try and let me know what you think about it and what other options do should be included in it.
For those that are using EE or for whatever reason are not able to download the extension from Magento Connect, you can download it from here: