Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento CE 1.7.0.2:只有在footer.phtml上启用缓存时,某些方法才起作用_Magento_Caching_Footer - Fatal编程技术网

Magento CE 1.7.0.2:只有在footer.phtml上启用缓存时,某些方法才起作用

Magento CE 1.7.0.2:只有在footer.phtml上启用缓存时,某些方法才起作用,magento,caching,footer,Magento,Caching,Footer,启用Magento缓存:Mage::getBlockSingleton'page/html_header'->GetiHomePage等方法仅当在页脚上启用缓存时才起作用。phtml不,因为页脚的phtml将作为块缓存。您应该将块嵌套在page.xml中,它不会缓存,例如cart_边栏,或者如果您只针对主页,则在管理中转到主页cms,转到布局更新并在那里添加块 <reference name="footer"> <block type="your/block" name="yo

启用Magento缓存:Mage::getBlockSingleton'page/html_header'->GetiHomePage等方法仅当在页脚上启用缓存时才起作用。phtml

不,因为页脚的phtml将作为块缓存。您应该将块嵌套在page.xml中,它不会缓存,例如cart_边栏,或者如果您只针对主页,则在管理中转到主页cms,转到布局更新并在那里添加块

<reference name="footer">
<block type="your/block" name="yourblock" template="path/to/block.phtml" before="-"  />
</reference>