7

I want to ask that how to turn on template hints and template hint links in admin panel?

  • 4
    which version in magento1 or magento2? – Rakesh Jesadiya Sep 29 '16 at 6:21
7

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.

4

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

3

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

  • You should never edit the core files, even if you are a developer.! – Manashvi Birla Sep 29 '16 at 6:40
  • 1
    Normally I agree, but as long as it doesn't end up in version control, everything is fine :-) – Fabian Blechschmidt Sep 29 '16 at 6:45
  • @Manashvibirla That's true if it is something required for a longterm run. In this case, this is just to view a file path and I don't see any mistake if the changes can be reverted in the local environment itself. – Nidheesh Sep 29 '16 at 6:47
2

If it is Magento 2

Store > Configuration > Advanced > Developer > Debug > Enabled
Template Path Hints for Admin > Yes
  • The solution for Magento 1 enables the path hints for frontend, not admin panel. There is no configuration in magento 1 to enable path hints for admin – Manashvi Birla Sep 29 '16 at 6:30
  • Yes, i modified my answer. – Krishna ijjada Sep 29 '16 at 6:43
  • I have done this but not able to see template hints I am using 2.1.7 is there anything to append to url – siddhesh Jul 13 '17 at 14:17
1

You can enable template hints for frontend and backend using extension "Easy Template Path Hints". It is beneficial in many ways as it provides hints of both admin and frontend. You can access hints by altering URL with certain keyword postfix after URL. There is no need to enable Magento default template hint.

https://www.magentocommerce.com/magento-connect/easy-template-path-hints.htmlts.html

0

If you want to enable template path hints in magento-1.9 version. You have two methods.

  1. First method:
System > Configuration > Current configuration scope (at top left) > change to main website > Advanced > Developer > Debug > Enabled
Template Path Hints for Admin > Yes
  1. Second method:

You can enable template hints for frontend and backend using extension "Easy Template Path Hints".https://www.magentocommerce.com/magento-connect/easy-template-path-hints.html

0

In Magento2 go to core_config_data table, look for path dev/debug/template_hints_admin and set its value to 1.

UPDATE `core_config_data` SET `value` = '1' WHERE `path` = 'dev/debug/template_hints_admin'
0

There are 2 ways in which you can enable/disable magento admin pages template hints.

One through FTP & other through Database.

FTP : Edit the app/etc/config.xml

<config>

    ...

    <stores>
        <admin>
            <dev>
                <debug>
                    <template_hints>1</template_hints>
                    <template_hints_blocks>1</template_hints_blocks>
                </debug>
            </dev>
        </admin>
    </stores>

</config>

DATABASE: Insert these 2 rows into database.

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

Here you have additional details about disabling or restoring the changes back.

0

open /app/etc/local.xml and add the follow code

<config>

    ...

    <websites>
        <admin>
            <dev>
                <debug>
                    <template_hints>1</template_hints>
                    <template_hints_blocks>1</template_hints_blocks>
                </debug>
            </dev>
        </admin>
    </websites>
</config>

or you can do with database tables as follows

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.