public function __construct($attributes = array()) { parent::__construct(); $this->addData(array('cache_lifetime' => null)); $this->menu = new JAMenuMega(); $this->params = new stdclass(); $this->params->megamenu = 1; $this->params->startlevel = 0; $this->params->endlevel = 10; }
public function __construct($attributes = array()) { parent::__construct(); if (!Mage::helper('jmmegamenu')->get('show', $attributes)) { return true; } //disable cache in this $this->addData(array('cache_lifetime' => null)); $this->addCacheTag(array(Mage_Core_Model_Store::CACHE_TAG, Mage_Cms_Model_Block::CACHE_TAG)); $this->megaHelper = Mage::helper('jmmegamenu/megaClass'); $params = array('animation' => Mage::helper('jmmegamenu')->get('animation', $attributes), 'addition_class' => ''); $params = array_merge($params, $attributes); $this->megaHelper->setParams($params); }
public function __construct($attributes = array()) { parent::__construct(); if (!Mage::helper('jmmegamenu')->get('show', $attributes)) { return true; } //check cache status $cacheType = 'wavethemes_jmmegamenu'; $useCache = Mage::app()->useCache($cacheType); //on/off block html cache if (!$useCache) { //off default block cached $this->addData(array('cache_lifetime' => null)); } else { $this->addData(array('cache_key' => $this->getCacheId($attributes), 'cache_lifetime' => $this->cacheLifeTime)); } $this->megaHelper = Mage::helper('jmmegamenu/megaClass'); $params = array('animation' => Mage::helper('jmmegamenu')->get('animation', $attributes), 'addition_class' => ''); $params = array_merge($params, $attributes); $this->megaHelper->setParams($params); }