Bobcares

Enable Template Hints Magento 2 | Using CLI or Admin Panel

by | May 8, 2024

Let’s look into the ways in which we can enable template path hints in Magento 2. At Bobcares, with our Magento Development Services, we can handle your issues.

How to Enable Template Path Hints in Magento 2

When working with Magento stores, developers and designers can find great use for Template Path Hints in Magento 2. Enabling Template Path Hints allows us to see the file paths of the template files that are in charge of rendering each section of the page on the front end of the website. This graphic tool is very helpful in troubleshooting layout issues.

It also figure out which template files are being used, and comprehending the structure of Magento themes. Through the Magento Admin Panel, developers may easily identify specific template files linked to particular webpage blocks or sections by enabling Template Path Hints. Here, we’ll see two ways to enable the Template Path Hints:

Enabling Using Admin Config

1. Log in to the Magento Admin Panel.

2. Then, go to Stores > Configuration.

3. Under Advanced, click on Developer.

4. Expand the Debug section.

5. Set Enabled Template Path Hints for Storefront to “Yes”.

6. We can also set Add Block Names to Hints to “Yes” for additional details. This is optional.

7. Click on Save.

Enabling Using Command Line

1. Go to the root folder.

2. Run the following commands:

enable template hints magento 2

3. We can also disable it using the command below:

enable template hints magento 2

4. Now, flush the cache using the command:

enable template hints magento 2

Disabling Template Path Hints is necessary just before moving the Magento store to a production environment, even if they are quite helpful during the development and customization stages.

[Need to know more? Get in touch with us if you have any further inquiries.]

Conclusion

To sum up, our Tech team went over the details of enabling template path hints in Magento 2 using either Admin Panel or Command-Line.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.