I'm trying to move the static CMS block from the category view into the sidebar. In my themename/template/catalog/category/view.phtml it is called with
$this->getCmsBlockHtml()
Since it's defined as
/**
* Retrieve current category model object
*
* @return Mage_Catalog_Model_Category
*/
public function getCurrentCategory()
{
if (!$this->hasData('current_category')) {
$this->setData('current_category', Mage::registry('current_category'));
}
return $this->getData('current_category');
}
public function getCmsBlockHtml()
{
if (!$this->getData('cms_block_html')) {
$html = $this->getLayout()->createBlock('cms/block')
->setBlockId($this->getCurrentCategory()->getLandingPage())
->toHtml();
$this->setData('cms_block_html', $html);
}
return $this->getData('cms_block_html');
}
I've tried adding this:
echo $this->getLayout()->createBlock('cms/block')->setBlockId( $this->getCurrentCategory()->getLandingPage() )->toHtml()
into my themename/template/callout/left-col.phtml file, but this throws errors.
How do I make it work?