Enable/disable template/block Hints Using MySQL
Enable/disable template/block Hints Using MySQL

Enable/disable template/block Hints Using MySQL

Published January 8, 2010 in Development
Initial Magento Setup Development Tips
December 30, 2009
Add Magento Admin Account Using MySQL Script
January 21, 2010

When doing front end development with Magento, there are many times when I want to turn on template/block hints for a one-page load. I don’t like having to wait on the Magento admin to load up the System > Configuration > Developer page, switch to Website view, and then turn on template/path hints. I have written a couple of MySQL snippets that allow me to enable/disable hints with one query.

 

I wrote the scripts so that for clean Magento installs, they will insert the necessary records into the core_config_data table. For Magento installs that have had the hints enabled/disabled, the record will already be present in the config table, so the script will just update that record.

Enable template/block hints for the first* website

Disable template/block hints for the first* website

As I covered in this post, it is possible to turn on hints at a global level, which activates hints for all website and for the admin panel. This is useful if you’re making customizations to the admin panel, or if you have multiple websites for which you’re wanting to activate/deactivate hints at the same time. The following two snippets modify hints at a global level:

Enable template/block hints for the admin panel and ALL websites

Disable template/block hints for the admin panel and ALL websites

* If you have multiple websites, you’ll need to update the ‘1’ value set for the website field to reflect the ID of your website. If you have multiple websites, you can just turn on hints globally using the last two SQL snippets.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.