I want to ask that how to turn on template hints and template hint links in admin panel?
10 Answers
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.
-
1I built a module for enabling hints on admin, hope this can help others github.com/ledian-hymetllari/adminhints Feb 26, 2018 at 8:24
-
Don't edit the database. Just use xml: magento.stackexchange.com/a/349937/46397 Nov 20, 2021 at 11:48
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
-
You should never edit the core files, even if you are a developer.! Sep 29, 2016 at 6:40
-
1Normally I agree, but as long as it doesn't end up in version control, everything is fine :-) Sep 29, 2016 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.– NidheeshSep 29, 2016 at 6:47
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 Sep 29, 2016 at 6:30
-
-
I have done this but not able to see template hints I am using 2.1.7 is there anything to append to url– siddheshJul 13, 2017 at 14:17
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
If you want to enable template path hints in magento-1.9 version. You have two methods.
- First method:
System > Configuration > Current configuration scope (at top left) > change to main website > Advanced > Developer > Debug > Enabled Template Path Hints for Admin > Yes
- 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
-
You must not have read the question. Your solution is for frontend hints and the question is about adminhtml. Nov 20, 2021 at 11:46
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'
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.
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');
All of the answers about temporarilym modifying the database are just the wrong thing to do.
I have always done this.
Locate this file:
/app/etc/local.xml
And add this to it:
<config>
...
<websites>
<admin>
<dev>
<debug>
<template_hints>1</template_hints>
<template_hints_blocks>1</template_hints_blocks>
</debug>
</dev>
</admin>
</websites>
</config>
I went one further than this and created an extension:
Start with the module xml file app/etc/modules/HenryHayes_AdminTemplateHints.xml
:
<?xml version="1.0"?>
<config>
<modules>
<HenryHayes_AdminTemplateHints>
<active>true</active>
<codePool>community</codePool>
</HenryHayes_AdminTemplateHints>
</modules>
</config>
And then do this in the config file app/code/community/HenryHayes/AdminTemplateHints/etc/config.xml
:
<?xml version="1.0"?>
<config>
<modules>
<HenryHayes_AdminTemplateHints>
<version>1.0.0</version>
</HenryHayes_AdminTemplateHints>
</modules>
<websites>
<admin>
<dev>
<debug>
<template_hints>1</template_hints>
<template_hints_blocks>1</template_hints_blocks>
</debug>
</dev>
</admin>
</websites>
</config>
To switch it off set active to false in app/etc/modules/HenryHayes_AdminTemplateHints.xml
:
<active>false</active>