How to Enable Template Path Hints in Magento 2
Are you looking for How to Enable Template Path Hints in Magento 2 tutorial? So you are in the right place. In this post we are going to help you enable template path hints for frontend and admin from Magento admin panel also.
Template path hints in Magento 2 assist you in the process of defining, for example, a .php block class that corresponds to one of your store’s specific page areas. You are also able to locate the .phtml files easier and of course edit them more quickly thanks to the notation added with each path’s template. The code can be found both on the frontend and the backend in the Magento file structure.
To Enable Template Path Hints in Magento 2
We have divided our tutorial into two main parts as follows:
3 Steps to Enable template path hints in Magento 2
- Step 1: Go to admin panel
- Step 2: Choose Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront
- Step 3: Click Yes to Enabled Template Path Hints
Enabled Template Path Hints for Admin
Go to the admin panel:
Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Admin > Yes
Enable Template Path Hints Command Line
8/2016
At this moment, there may be no command line to enable or disable Template Path hint via command line (Default Magento 2 Command line).
Let’s wait for the next Magento update or the external module.
Updated 1/2018
Now you can enable or disable Template path hints via Command Line Go to Magento 2 root folder and run the following command:
Command for Enable :-
php bin/magento dev:template-hints:enable
Command for Disable :-
php bin/magento dev:template-hints:disable
Now you have completed the template path hints enabling process for your Magento 2 store. When you have any questions, feel free to discuss with us below. And remember to check out the following related topics to get more insight into this issue.
Happy coding!