Better template block hints for designing Magento2 templates and modifying layout XML
Better Block Hints is a very simple Magento2 extension for helping you work with Magento2's templating system. The default block hints don't include a lot of vital information, such as the block name. It's also extremely ugly and can wreak havok on your layout so that you can't really roll with template hints on., (*1)
This extension helps address this problem by making block hints toggleable in the browser, and showing much more useful information., (*2)
Navigate to your base Magento2 directory (the one with the app
, pub
, and dev
directories and run the command composer require rsc/betterblockhints --dev
. Then run bin/magento setup:upgrade
., (*3)
Turn on template path hints in Magento 2., (*4)
Refresh your page and hold either the ALT, SHIFT, CMD, or CTRL keys to show template hints. To get information about a block, hover over it and click it. The block you wanted to learn more about will stay fixed to the middle of the screen until you press any action key again (control, shift, command, or alt)., (*5)
Note: This extension is designed to minimize display errors typically caused by template hints, but may not eliminate them entirely. Test your layouts with hints off to be sure of your changes., (*6)
, (*7)