Contents
In many cases, you want to find the correct file path being used for your theme without finding it anywhere.
With the Magento system, you will easily do that. In today’s article, I will guide you to enable sample paths in Magento 2 under 2
- How to enable sample-path hinting using an administrator configuration.
- How to enable template path hints by command-line.
1. Turn on sample path suggestions in the administrative configuration
1.1. For Item Facade
In this way to enable sample path suggestion in Magento 2 we follow 3 steps:
- Step 1: Go to the admin panel.
- Step 2: Choose Admin Panel – > Store -> Configuration -> Advanced -> Developer -> Debug -> Enabled Template Path Hints for Storefront.
- Step 3: Choose YES to enable template path hints.

And here is the interface after turning it on:

1.2. For the admin page
For the administrator path template, we will follow these steps:
- Step 1: Log in to the admin account.
- Step 2: Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Admin > Yes.

2. Turn on template path hints with command line
In addition to configuring ways in the admin, we can also enable this path via command line through the steps below.
First you open the command windows.
If you want to enable sample path then type the following command:
php bin/magento dev:template-hints:enable
Otherwise, if you want to disable it, type the following command:
php bin/magento dev:template-hints:disable
Then you clear the cache and run it.
[your_url]?templatehints=[Parameter Value]
Enter your url of the text below to enable the example path on the interface

And here is an example for adding value to url to enable path hints in Magento 2

Note: Do not forget to delete the Magento cache.
Above is the instruction to enable the sample path by admin interface and by command line. Hope the article will help you. Goodbye and see you again.