title | redirect_to |
---|---|
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.
{:.bs-callout-info} Template Path Hints can be edited in [Developer Mode]({% link magento/installation-modes.md %}) only.
See Locate templates, layouts, and styles{:target="_blank"} in the developer documentation.
![Example storefront - template path hints]({% link images/images/storefront-template-path-hints.png %}){: .zoom} Template Path Hints in Storefront
Before using template path hints, add your IP address to the [allow list]({% link system/developer-client-restrictions.md %}) 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.
![Advanced configuration - developer client restrictions]({% link images/images/config-advanced-developer-developer-client-restrictions.png %}){: .zoom} [Developer Client Restrictions]({% link configuration/advanced/developer.md %})
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand Advanced and choose Developer.
-
Expand ![Expansion selector]({% link images/images/btn-expand.png %}) the Debug section and do the following:
![Advanced configuration - debug]({% link images/images/config-advanced-developer-debug.png %}){: .zoom} [Debug]({% link configuration/advanced/developer.md %})
-
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.
-
On the Admin sidebar, go to System > Tools > Cache Management.
-
In the upper-right corner, click Flush Magento Cache.