1

I know how to enable template paths and we are also using 'Easy Template Paths.' However, we want to disable some JavaScript when template paths are enabled.

To do so, we would like to add a class to the tag only if template paths are enabled. We've dug around a bit and figured that this has something to do with the 'getShowTemplateHints()' function (from /app/code/core/Mage/Core/Block/Template.php).

However, we are not sure what the if function in php would look like to detect if template paths are enabled.

This would look something like:

<body class="<?php echo $this->getBodyClass();?> <?php if(//need boolean to check here): ?>tpaths_enabled<?php endif;?>">

What we're unsure about is how to actually get the boolean value from Magento to check if template paths are enabled.

Thanks in advance

1 Answer 1

0

Somteimes the answer is only a few seconds away...

<body class="<?php echo $this->getBodyClass();?> <?php if($this->getShowTemplateHints()): ?>tpaths_enabled<?php endif;?>">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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