Magento - get current product

前端 未结 4 2052
天涯浪人
天涯浪人 2021-02-05 08:18

I have a sidebar block in my layout that is being displayed on different pages.

In this block I have a list of products, and I want to select the current product when I

4条回答
  •  自闭症患者
    2021-02-05 08:37

    If you're not willing to use your own block class inheriting from Mage_Catalog_Block_Navigation, in which you could set your own cache informations (to make it eg depending on the current product), you can get rid of the cache for your block by using this in its layout definition :

    
        cache_lifetime
    
    

提交回复
热议问题