Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom module. Inside _prepareForm I have also field editor.

$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('add_variables' => false, 'add_widgets' => true,'files_browser_window_url'=>$this->getUrl().'admin/cms_wysiwyg_images/index/'));
            'label' => Mage::helper('mymodule')->__('Some text'),
            'name' =>  'my_field_name',
            'config'    => $wysiwygConfig,

I can insert widget inside editor and when I press Save, it is still proper recognized. But when I call that field value inside template


it will show

{{widget type="cms/widget_block" template="cms/widget/static_block/default.phtml" block_id="1"}}

instead of actual widget content.

How does Magento parse data if widget is inside, how can I show this widget once it was inserted inside editor?

share|improve this question
up vote 3 down vote accepted

Getting my_field_name will return you raw content from the database. You have to pass it through CMS processor:

echo Mage::helper('cms')->getBlockTemplateProcessor()->filter($myobject->getData('my_field_name'));
share|improve this answer
Thank you, that is what I was looking for! – JohnyFree Mar 31 '14 at 10:27

In your Block file you can override the _toHtml method. It is the magento filter static block and cms pages content :

protected function _toHtml()
    $html = parent::_toHtml();
    return Mage::helper('cms')->getBlockTemplateProcessor()->filter($html);

In this way it will process all your content. See in these files :

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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