Magento Layered Navigation block. Move to center

Carpy picture Carpy · Jul 25, 2012 · Viewed 8.6k times · Source

In category.xml I'm changing the reference name in:

    <reference name="left">
        <block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>
    </reference>

To content which I assumed would place the layered nav into the center. However, it still stays on the left. In fact, even I changed left to right, and it still doesn't move from the left sidebar.

What am I doing wrong here?

Answer

Carpy picture Carpy · Jul 28, 2012

I managed to fix this (for anyone else who encounters this problem) by commenting out or deleting the below call in catelog.xml:

<reference name="left">
    <block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>
</reference>

Then adding this line within the name="product_list" block just below.

<block type="catalog/layer_view" name="filter" template="catalog/layer/view.phtml"/>

Then within list.phtml echo it like: <?php echo $this->getChildHtml('filter');?>