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