Get Free Audit

How to Enable Template Path Hints in Magento 2

Apr 3, 2018

4712 Andrey Litvin

How to Enable Template Path Hints in Magento 2

We keep exploring the latest version of the most popular ecommerce development platform. In this article you are going to learn about different ways to enable and disable template path hints in Magento 2. Here you can see a brief list of frequently asked how-to questions that our Magento developers tried to cover in this article:

  • How to enable template path hints via Admin panel?
  • How to enable template path hints via command line?
  • How to enable/disable template path hints via mysql for Storefront?
  • How to enable/disable template path hints via mysql for Admin?
  • How to enable/disable template path hints via env.php file?

Enabling template path hints via Admin panel

For storefront: Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront > Yes.

For Admin: Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Admin > Yes.

Here how it looks like on the Admin page (click on the image to open it in full size):

admin

After that we should clean the cache. Do it via the Admin panelSystem > Tools > Cache Managment > Select All > Refresh > Submit.

Andrey_Dubina

Partner With Us

Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

Or using the console:


This is how our front is going to look like (click on the image to open it in full size):

front 1

The Admin page will look like this (click on the image to open it in full size):

admin 1

Enabling Template Path Hints via Command Line

For Storefront

Disable frontend template hints:


Enable frontend template hints:


After that cache flush might be required:


For Admin

Enabling and disabling frontend template hints is not possible for Admin in the current version Magento 2.2.3.

magento webdesign

Magento Webdesign

Take your online store to the next level with BelVG Magento Webdesign

Visit the page

Enabling/Disabling Template Path Hints via mysql for Storefront

Scope contains the value Store View.

Scope will equal default for Default Store View. For Main Website, scope will equal websites.

Enable:

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey


Disable:

Enabling/Disabling Template Path Hints via mysql for Admin

Enable:


Disable:

Enabling/Disabling Template Path Hints via env.php file

In case you cannot change the value via the Admin panel, as shown on the screenshot (click on the image to open it in full size):

env

search for the value in file app/etc/env.php

In this file you can change the value template_hints_storefront and template_hints_admin.


That is how you deal with Template Path Hints in Magento 2. We hope these tips will be helpful and clear to you. If not, please ask your questions in the comment section.

To learn other useful tips on Magento 2 Development click here.

Need experienced Magento developers? BelVG can help!

magento development services

Magento Development Services

Take your online store to the next level with BelVG module

Visit the store
Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *