How to obtain template hints in admin panel?

You can do it by changing the database directly. If you have something like phpMyAdmin that is a good way to gain access. Enter this SQL.

INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`)
       VALUES ('websites', '0', 'dev/debug/template_hints', '1');

When you are done with path hints just delete the matching record from core_config_data Or update the value field to 0 instead of deleting the whole record, it will probably be the last one since you've just added it.


If it's for magento1.x then go to

app/code/core/Mage/Core/etc/system.xml

First take backup of this file and change below code

<template_hints translate="label">
    <label>Template Path Hints</label>
    <frontend_type>select</frontend_type>
    <source_model>adminhtml/system_config_source_yesno</source_model>
    <sort_order>20</sort_order>
    <show_in_default>1</show_in_default> <!--change this value to 1-->
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>
</template_hints>

And change setting from System->Configuartion->Developer and set template path hint on change this on default level otherwise you cannot see hint on

Revert this file when you done


If you are a magento developer Modify

app/code/core/Mage/Core/Block/Template.php as below:

public function fetchView($fileName)
{
    .......
    .......
    //Commented to show the hints everywhere
    //Line #221
    //if ($this->getShowTemplateHints()) { 
        ......
        ......
        if (self::$_showTemplateHintsBlocks) { //Comment if you want to see the block hints
        ........
        ........
        } //Comment if you want to see the block hints
    //}
    .......
    .......
    //Line #251
    //if ($this->getShowTemplateHints()) {
    .......
    //}
}

DON'T FORGET TO REVERT THIS ONCE YOU ARE DONE