Enable Template Path Hints and Block Names in Default Config Options

If you have been using Magento for even a short time you have found the usefulness of enabling the Template Path Hints and Block Names on your website. Unfortunately those options don’t exist in the default config by default.
Thankfully, due to the very configurable and modular nature of Magento, the options to turn them on are easy to change.

The only file you will need to edit is the app/code/core/Mage/Core/etc/system.xml file.
This file contains a debug element containing a fields element. Within the fields element are two elements that will concern you, the template_hints and template_hints_block. Contained within those elements are show_in_default elements that determine whether the parent option will show up in the admin interface. If the value is 1 it will be visible, 0 will not make it visible.
Below is an excerpt of my config, with the values set to 1. See the highlighted lines.

<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>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>
</template_hints>
<template_hints_blocks translate="label">
    <label>Add Block Names to Hints</label>
    <frontend_type>select</frontend_type>
    <source_model>adminhtml/system_config_source_yesno</source_model>
    <sort_order>21</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>
</template_hints_blocks>

With these settings changed, you will now be able to see the options in the developer configuration screen.

Enjoy!

Leave a Reply

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

Time limit is exhausted. Please reload the CAPTCHA.