Recently I got a chance to rewrite Magento’s layered navigation standard functionality. The request was very specific as the client wanted to keep all of the “filters” visible all the time. For example if you wish to filter your results by Color (let’s say you have yellow, green, red, blue and magenta) products are filtered but the layered navigation displays all filters. This way a costumer can re-filter the products in current category without the need to return to the category view.
Files that are used for layered navigation are situated in app/design/frontend/base/default/template/catalog/layer/ folder. File used for layered navigation is view.phtml – it shows us all of the filters when we click on a category. File used for active state is state.phtml – when we click on one of the filters it is responsible for the results – so we’re gonna edit this one. So copy the state.phtml from base to your package or theme.
This is the original code in state.phtml: