Friday, November 23, 2012

Magento - Disable html block cache for a specific Block

Answer: Use getchildhtml with second arg as false.

For Example:

phtml file change:

echo $this->getChildHtml('topCategoriesList',false);

 

xml file change:

<block type="catalog/navigation" name="topCategoriesList" as="topCategoriesList" template="catalog/navigation/categorylist.phtml"

   <action method="unsetData"><key>cache_lifetime</key></action>

       <action method="unsetData"><key>cache_tags</key></action>

</block>

No comments:

Post a Comment