Beispiel #1
0
 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     parent::__construct();
     $my_template = $this->getTemplate();
     if (empty($my_template)) {
         $my_template = "ves/layerslider/default.phtml";
     }
     $this->setTemplate($my_template);
 }
Beispiel #2
0
 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     parent::__construct($attributes);
     /*Cache Block*/
     $enable_cache = $this->getConfig("enable_cache", 1);
     if (!$enable_cache) {
         $cache_lifetime = null;
     } else {
         $cache_lifetime = $this->getConfig("cache_lifetime", 86400);
         $cache_lifetime = (int) $cache_lifetime > 0 ? $cache_lifetime : 86400;
     }
     $this->addData(array('cache_lifetime' => $cache_lifetime));
     $this->addCacheTag(array(Mage_Core_Model_Store::CACHE_TAG, Mage_Cms_Model_Block::CACHE_TAG, Ves_Layerslider_Model_Config::CACHE_WIDGET_TAG));
 }