I want to enable template path hints in admin panel. I know how to do it for the front end, but for back end?? I actually want to edit the admin panel .
Thanks in a
The feature wasn't designed to be used on the admin. Its system config is explicitly set to only allow you to se this at the website or store level, not the global level.
Assuming this is just for work in a development environment, the approach I'd take would be to override the class
Mage_Core_Block_Template
and override (with a class alias override, or a local/Mage replacement) the getShowTemplateHints
method hints.
public function getShowTemplateHints()
{
//return false
return true;
}
// old method, here for demo purposes only. Don't hack the core
// public function getShowTemplateHints()
// {
// if (is_null(self::$_showTemplateHints)) {
// self::$_showTemplateHints = Mage::getStoreConfig('dev/debug/template_hints')
// && Mage::helper('core')->isDevAllowed();
// self::$_showTemplateHintsBlocks = Mage::getStoreConfig('dev/debug/template_hints_blocks')
// && Mage::helper('core')->isDevAllowed();
// }
// return self::$_showTemplateHints;
// }
You can then manually change getShowTemplateHints to return true or false if you want the feature on or off, or add whatever additional logic you wanted.
I would not recommend you push this change to the production server.