Template Path Hints
Template Path Hints are a diagnostic tool that adds notation with the path to each template that is used on the page. Template path hints can be enabled for either the storefront or the Admin.
Template Path Hints can be edited in Developer Mode only.
See Locate templates, layouts, and styles in the developer documentation.
Template Path Hints in Storefront
Step 1: Add your IP address to the allow list
Before using template path hints, add your IP address to the allow list to avoid interference with customers who are shopping in the store. When you are finished, make sure to clear the Magento cache to remove all hints from the store.
Step 2: Enable template path hints
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand Advanced and choose Developer.
-
Expand the Debug section and do the following:
-
To activate template path hints for the store, set Enabled Template Path Hints for Storefront to
Yes
. -
To enable template path hints for the store only when the URL includes the
templatehints
parameter, set Enable Hints for Storefront with URL Parameter toYes
. Then set value for the parameter if needed. The default value ismagento
, but you can use a custom value. For example, if you change the value tolorem
, you would usemymagento.com?templatehints=lorem
to display template hints. -
To activate template path hints for the Admin, set Enabled Template Path Hints for Admin to
Yes
. -
To include the names of blocks, set Add Block Names to Hints to
Yes
.
-
-
When complete, click Save Config.
Step 3: Clear the cache
-
On the Admin sidebar, go to System > Tools > Cache Management.
-
In the upper-right corner, click Flush Magento Cache.