I'm adding a textearea to the Catalog > Manage Categories > General Information tab in which I can put additional description for the category page. In the frontend this needs to appear at the bottom of the category, below the category collection. I want to do this in the form of a custom module and so far everything works, except for one tiny little issue.

I want to use Magento Template Tags in the backend textarea, like the {{store direct_url=''}} storeDirective, but this doesn't work in the frontend. Somehow the output for those tags is not correct. It gives www.domain.com/category/%7B%7Bstore direct_url''%7D%7D

I've read that the value comes from the Mage_Core_Model_Email_Template_Filter class and therefore I have created a Mynamespace_Mymodule_Model_Template_Filter class which contains

class Mynamespace_Mymodule_Model_Template_Filter extends Mage_Core_Model_Email_Template_Filter

But this doesn't work. I'm stuck now and would really appreciate any help.

Thank you!


The easiest way is to pass the variable through the filter method in the template:

echo $processor->filter($_categoryDescription);
  • thank you for your answer. I will try and see how this works out. – ForMat Oct 23 '14 at 9:31

I ended up adding Class Mynamespace_Mymodule_Helper_Output to my module with the following content:

class Mynamespace_Mymodule_Helper_Output extends Mage_Catalog_Helper_Output
    public function categoryAttribute($category, $attributeHtml, $attributeName)
        if (Mage::helper('catalog')->isUrlDirectivesParsingAllowed()) {
            $attributeHtml = $this->_getTemplateProcessor()->filter($attributeHtml);
        $attributeHtml = $this->process('categoryAttribute', $attributeHtml, array(
            'category'  => $category,
            'attribute' => $attributeName
        return $attributeHtml;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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