Magento Forum

   
Magento Enterprise FPC problem
 
Plamen Dimov
Jr. Member
 
Total Posts:  6
Joined:  2010-05-26
 

Hello,

I am trying to create a FPC placeholder like that:

<catalog_breadcrumbs>
<block>page/html_breadcrumbs</block>
<name>breadcrumbs</name>
<placeholder>PAGE_BREADCRUMBS</placeholder>
<container>Enterprise_PageCache_Model_Container_Breadcrumbs</container>
<cache_lifetime>86400</cache_lifetime>
</catalog_breadcrumbs>

And the class:

class Enterprise_PageCache_Model_Container_Breadcrumbs extends Enterprise_PageCache_Model_Container_Abstract
{
protected function _getIdentifier()
{
return $this->_getCookieValue(Enterprise_PageCache_Model_Cookie::COOKIE_CUSTOMER, ‘’);
}

protected function _getCacheId()
{
return ‘CONTAINER_BREADCRUMBS_’ . md5($this->_placeholder->getAttribute(’cache_id’));
}

protected function _renderBlock()
{
$blockClass = $this->_placeholder->getAttribute(’block’);
$template = $this->_placeholder->getAttribute(’template’);

$block = new $blockClass;
$block->setTemplate($template);
return $block->toHtml();
}

protected function _saveCache($data, $id, $tags = array(), $lifetime = 84600) { return false; }
}

But the block isn’t rendered at all. When I try var_dump($block->toHtml()); it gives me empty string. And when I try var_dump($template) ... the template is rendered correctly. Does anyone have an idea what am I doing wrong ?

Thanks,

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top