protected function _beforeToHtml() { if ($this->isConfigurable()) { $this->setTemplate('udprod/catalogProductHelperGallery.phtml'); } return parent::_beforeToHtml(); }