I've added my code to cms.xml to display static blocks in the footer. I want them to be in the following order:
- Left
- Middle
- Right
But when I check my site, they're loaded in this order:
- Right
- Left
- Middle
Here is the code I use to display the blocks
<reference name="footer">
<block type="cms/block" name="cms_footer_links" before="footer_links">
<action method="setBlockId"><block_id>footer_links</block_id></action>
</block>
<block type="cms/block" name="cms_footer_middle" before="footer_middle">
<action method="setBlockId"><block_id>footer_middle</block_id></action>
</block>
<block type="cms/block" name="cms_footer_right" before="footer_right">
<action method="setBlockId"><block_id>footer_right</block_id></action>
</block>
</reference>
Can anybody tell me what i'm doing wrong?
Best Answer
I see that you have
before
attributes in your layout.The value of
before
should not be the static block id. It should be theblock type="cms/block"
name.But if you want to add them in that order you should use
after
instead ofbefore
. Both of them work, but it's more readable usingafter