Magento – Add CMS Static Block Underneath Categories in Left Sidebar

cmssidebarstatic-blockxml

Because my category pages are quite empty, I wanted to fill up some space with a Static Block on the left sidebar of the page. I've created a Static Block in the CMS of Magento, and I'm able to place them on the category pages and other pages. I did this by going to Pages in CMS Management in Magento and under "layout" pasting the following code:

<reference name="left">
<block type="cms/block" name="left_block" before="-">
<action method="setBlockId"><block_id>left_block</block_id></action>
</block>
</reference>

Now my Static Block is showing perfectly, but it's appearing above the 'Shop By' menu on the same left sidebar. Screenshot of my problem

Can anybody help me out with placing my new Static Block underneath the 'Shop By' (Blader Door) block?

Thanks!

Best Answer

Magento is managing block position by

  • after=""
  • before=""

tags on layout XML. Find left filter block name.

before/after:

before/after are layout attributes that we can set that allow us to define the position of our block inside structure block

Put this after='yourleftfilterBlockName' instead is before=''

As per magento rwd theme block name left hand filter is catalog.leftnav

then your solution is like:

<reference name="left_first"> <!-- use left_first instead of left for rwd theme-->
<block type="cms/block" name="left_block" after="catalog.leftnav">
<action method="setBlockId"><block_id>left_block</block_id></action>
</block>
</reference> 
Related Topic