2

I have a cms page, where custom collection is displayed. I want to add filter to this page.

Magento version: EE 1.14.2.4

contents of my cms page:

{{block type="catalog/product_list" template="template.phtml"}}

in a template.phtml tried this code

$filter = new Enterprise_Search_Block_Catalog_Layer_View();
echo $filter->setTemplate('catalog/layer/view.phtml')->toHtml();

but getting error

Varien_Exception: Invalid method Mage_Catalog_Model_Layer::toHtml(Array())

How can I add filter to my cms page?

I need a page, where a custom collection and a filter will be shown.

0

Solved.

$filter = new Enterprise_Search_Block_Catalog_Layer_View();
$filter->setLayout(Mage::app()->getLayout());
echo $filter->setTemplate('catalog/layer/view.phtml')->toHtml();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.