/** * Set custom template for filter * * @return string */ protected function _toHtml() { // set custom template for filter $filterableAttributes = $this->_getFilterableAttributes(); foreach ($filterableAttributes as $attribute) { $this->getChild($attribute->getAttributeCode() . '_filter')->setTemplate($this->_getFilterTemplate($attribute->getAttributeCode())); } return parent::_toHtml(); }
protected function _toHtml() { $html = parent::_toHtml(); if (!Mage::app()->getRequest()->isXmlHttpRequest()) { $html = '<div id="catalog-filters">' . $html . '</div>'; } return $html; }
protected function _toHtml() { if (!Mage::registry('subdomain')) { if (Mage::helper('gomage_navigation')->isGomageNavigation()) { $this->setTemplate('gomage/navigation/layer/view.phtml'); } } return parent::_toHtml(); }
protected function _toHtml() { if (Mage::helper('gomage_navigation')->isGomageNavigation()) { $currentCategory = Mage::registry('current_category'); if ($currentCategory && $currentCategory->getData('navigation_pw_gn_shopby') == GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::USE_GLOBAL || !$currentCategory) { $position = Mage::getStoreConfig('gomage_navigation/general/show_shopby'); } else { if ($currentCategory) { $position = $currentCategory->getData('navigation_pw_gn_shopby'); } } if ($position == GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::CONTENT) { if ($this->shop_by_in_content) { $this->setTemplate('gomage/navigation/layer/view.phtml'); $this->setData('check', GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Attributelocation::CONTENT); } else { $this->setTemplate(null); } } elseif ($position == GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::RIGHT_COLUMN) { if ($this->getNameInLayout() != 'gomage.catalog.rightnav') { $this->setTemplate(null); } else { $this->setTemplate('gomage/navigation/layer/view.phtml'); $this->setData('shopby_type', 'right'); $this->setData('check', GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Attributelocation::RIGHT_BLOCK); } } elseif ($position == GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::RIGHT_COLUMN_CONTENT) { if ($this->shop_by_in_content) { $this->setTemplate('gomage/navigation/layer/view.phtml'); $this->setData('check', GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Attributelocation::CONTENT); } else { if ($this->getNameInLayout() == 'gomage.catalog.rightnav' || $this->getNameInLayout() == 'catalogsearch.rightnav') { $this->setData('check', GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Attributelocation::RIGHT_BLOCK); $this->setTemplate('gomage/navigation/layer/view.phtml'); } else { $this->setTemplate(null); } } } elseif ($position == GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::LEFT_COLUMN_CONTENT) { if ($this->shop_by_in_content) { $this->setTemplate('gomage/navigation/layer/view.phtml'); $this->setData('check', GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Attributelocation::CONTENT); } else { if ($this->getNameInLayout() == 'catalog.leftnav' || $this->getNameInLayout() == 'catalogsearch.leftnav') { $this->setData('check', GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Attributelocation::LEFT_BLOCK); $this->setTemplate('gomage/navigation/layer/view.phtml'); } else { $this->setTemplate(null); } } } else { $this->setTemplate('gomage/navigation/layer/view.phtml'); $this->setData('check', GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Attributelocation::LEFT_BLOCK); } } return parent::_toHtml(); }