Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 2.75 KB

template-path-hints.md

File metadata and controls

51 lines (30 loc) · 2.75 KB
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

Step 1: Add your IP address to the allow list

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 %})

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]({% 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 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.