Enable Template/Block Hints in Admin Panel
Enable Template/Block Hints in Admin Panel

Enable Template/Block Hints in Admin Panel

Published July 10, 2009 in Development
Custom Admin Theme
July 11, 2009

Anyone that has developed a theme in Magento knows how helpful template/block hints are. They help quickly identify which files are being loaded for a specific page.

Magento’s admin panel uses the exact same design pattern as the front end (layouts + blocks + templates). If you’ve ever done any modifications to the Magento admin panel, you’ve probably tried to turn on template/block hints for the admin panel. The only problem is, Magento doesn’t have built-in support for this. I did some digging around and found out how to enable this feature in the admin panel.


Step 1 – Connect to database

Using your favorite database administration tool, connect to your Magento database. These are tools I’ve used and recommend: Navicat ($129), MySQL Query Browser (Free), Sequel Pro (Mac Only – Free), or phpMyAdmin (free).

Step 2 – Enter values into ‘core_config_data’ table

Run the following query on the Magento database:

Step 3 – Test in admin panel

Once you make this addition to the core_config_data database, template/block hints should show up in the admin panel. Here is a screenshot of the CMS Page with hints turned on:

Magento Admin - Hints Turned On

Magento Admin – Hints Turned On

Disabling Hints

When you’ve finished development want to turn off template hints in the admin panel, open the core_config_data table and change the ‘value’ column of the two row you inserted to “0”.

Why does this work?

For those of you who are like me and want to know the “why” as well as the “how”, I’m going to go over why this works. Here is the Magento code that checks to see if template/blocks hints are enabled:

File: /app/code/core/Mage/Core/Block/Template.php (Magento 1.3.2)

The “Mage::getStoreConfig” method checks for config values that are set in the current scope (ie, default, website, store, store view). In the admin panel, only values set in the “Default Scope” are loaded.

Magento only allows you to turn on hints when you’re in the configuration scope of a Website or Store View. This means that when the code above tries to load the configuration, it returns “null” because that config value isn’t set in the “Default Config” scope. Running the MySQL query above adds the hint config values to the “Default Config” scope. Here is a screenshot showing the settings for turning on the hints – notice that the “Main Website” configuration scope is selected.

Magento Config Scope Selection

Magento Config Scope Selection


I hope this helps you in your development of Magento modules that integrate with the admin panel. I considered writing a module to enable the hints to be turned on in the “Default Scope”, but decided against it, due to the simplicity of the method outlined in this post.


  1. Isolde van Oosterhout says:

    Thank you!!!! 🙂

    • Mirelon says:

      thank you, it was very helpful, i finally found the template i was looking for
      but in addition to store config to database i had to turn on template hints in admin > system > configuration > advanced > developer > debug (Step 2.5)

    • Shaheer says:

      THANK YOU VERY MUCH !!!!!!!!

      I cant explain how much I am happy . Its really helpful. I was struggling a lot because of this .

      Superb, Simply Outstanding

    • Igor says:

      Good idea with updating core_config_data It’s realy save time between switching BACKEND AND FRONTEND.

    • Het says:


      Actually i need to activate template path hints for admin..
      & I tried this one.. but couldn’t get it…
      wat to do???

      Please help me out..
      It’s urgent..

      Thanks in advance.
      Any help is appriciable..

    • Mitch says:

      THANKS! This seriously saved my life! Magento randomly enabled the debugging features on a clients site and no matter how many times I turned them off and updated the updating core_config_data DB table data they still showed up…so I had to comment out a few lines of code to get rid of the debugging features. Thanks again!

    • nate says:

      Thanks! After enabling path hints for one of my stores and running your SQL the block hints showed up.

      One note, in Magento (and probably others) if you open app/code/core/Mage/Core/etc/system.xml and change the “show_in_default” value to “1” (from 0) for “Template Path Hints” and “Add Block Names to Hints” these options will become available under “Default Config” right in the Admin interface.

    • kuhajeyan says:

      Thanks that is lot of help. for those who are still wondering why admin paths are not showing up once you have done the setup as described in the article. please flush the Magento cache

    • bigman00 says:

      thanks for your work, I did what you told, changed the default table value to 0, still show little red box, can I ask why?

    • Superfly says:

      F**ing awesome!!!

    • internetoutfitters says:

      rather than editing the database directly, just go with @nate’s solution above. edit the system.xml and the options for displaying template hints will show up for the Default config. worked great in 1.4

    • Blake says:

      wow, classllama has done it again! Spectacular work, you guys never cease to amaze me!

    • Maha says:

      THANK YOU… This rocks 😀

    • MagePsycho says:

      Hi Magento Lovers

      I have developed a great extension for enabling template path hints (for frontend & backend) easily just by passing some paramters via url.
      Moreover it’s like joomla like template path hints.

      You can find more details & live demo @

      Happy E-Commerce!!

    • Chris says:

      Thank you!! Very helpful

    • bhavana says:

      hi,i like your post.i would like to share this on my blog too.thank you

    • mamaloveu says:

      very useful! thanks

    • Anonymous says:

      Thanks, this is super helpful!

    • Lee says:


      Would you happen to know how to edit the description in the general tap located in the back-end when adding content to a product? I need to add something to the description value but I can’t seem to find its location, been trying for so long. 🙁

    • Regarding Template Hints,

      I could enable the Templete Hints in webshop using extension compatible with magento 1.7 and forwarding it for sharing of info.

      1)Downloaded Templete Hints extension from http://www.magentocommerce.com/magento-connect/easy-template-path-hints.html
      2)Using Easy_Template_Path_Hints-0.2.0_ready2paste.zip ,I pasted Module in app/code/local and xml file in app/etc/modules
      3)Logged to backend , System >> Configuration >> MagePsycho Extensions >> Easy Template Path Hints and clicked enabled =”YES” and Access Code = “” (means empty).
      4)I tried in front end by adding ?tp=1 after any page URL and I could see the hints accordingly.

      For instance, leads to webshop home page, and shows the homepage with template hints.

    • SQL to remove hints

      INSERT INTO core_config_data (scope, scope_id, path, value)
      VALUES ('default', 0, 'dev/debug/template_hints', 0),
      ('default', 0, 'dev/debug/template_hints_blocks', 0)
      ON DUPLICATE KEY UPDATE value=values(value)

    • Teja bhagavan says:

      Hii i want to convert the html files into Magento file. Can you suggest me? pls i need your help…

    • Alex McSharp says:

      Sorry, I maen Magento Debugger

    • Ericc Antunes says:

      In 1.9 version, don’t change DB!

      Go to the app > etc > “config.xml” search the XML nodes:

      stores > admin > dev > debug

      and change de value of “template_hints” and/or “template_hints_blocks” to 1.

      Peace! Bye!

  2. Alex says:

    Thank you Erik for helping me out with this issue, here i found 1 more helpful post about Magento 2 Layouts, Blocks, And Templates , have a look: https://www.cloudways.com/blog/magento-2-layouts-blocks-templates/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Recent PostsView all
October 15, 2021

Classy Llama Wins 2021 Comparably Awards for Best Perks&Benefits, Best Work-Life Balance

Classy Llama, Springfield’s only full-service eCommerce agency, has been placed on the top 50 list for Comparably.com’s Best Perks&Benefits Award, as well as their Best Work-Life […]
September 15, 2021

Classy Llama Awarded #3 Best Place to Work by Biz417

Springfield, MO — Classy Llama has been awarded the number 3 spot on the Biz417 Best Places to Work Top 20 for 2021.  This award is […]
September 13, 2021

2021 Instagram Changes: What you need to know for eCommerce Marketing

What’s Going On With Instagram in 2021? The Head of Instagram, Adam Mosseri, announced in summer 2021 that big changes are coming to the platform sometime […]