Magento – Change Layered Navigation Filter Output

filterlayered-navigation

I'm working on a problem at the moment in the layered navigation. I need to change how the filters are working. Currently they are called like so;

    $_filters = $this->getFilters();
    foreach ($_filters as $_filter):
    //various mark up and calls are made here

Then to output the individual options the following is used.

   $_filter->getHtml()

I need to find another way of getting this data, preferably unformatted. I am able to get each filters attribute code like so;

  $_filter->getFilterOptions()->getCode()

But I can't figure out how to use this to get the options belonging to each filter attribute.

The two most important pieces of information that I need are the option name and id. After this I can work everything out.

Best Answer

The output of $_filter->getHtml() can be found in app/design/frontend/base/default/template/catalog/layer/filter.phtml (filter items).

Related Topic