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.

Example storefront - template path hints Template Path Hints in Storefront

Step 1: Whitelist your IP address

Before using template path hints, add your IP address to the whitelist 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 Developer Client Restrictions

Step 2: Enable template path hints

  1. On the Admin sidebar, go to Stores > Settings > Configuration.

  2. In the left panel, expand Advanced and choose Developer.

  3. Expand Expansion selector the Debug section and do the following:

    Advanced configuration - debug Debug

    • 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 to Yes. Then set value for the parameter if needed. The default value is magento, but you can use a custom value. For example, if you change the value to lorem, you would use mymagento.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.

  4. When complete, click Save Config.

Step 3: Clear the cache

  1. On the Admin sidebar, go to System > Tools > Cache Management.

  2. In the upper-right corner, click Flush Magento Cache.