Magento Open Source, 1.9.x

Magento 1.x Security Patch Notice
For Magento Open Source 1.5 to 1.9, Magento is providing software security patches through June 2020 to ensure those sites remain secure and compliant. Visit our information page for more details about our software maintenance policy and other considerations for your business.

Controlling Block Order

To control the order of blocks in an XML layout update, include a “before” or “after” positioning property in the code. To place a block—either before, or after a specific block—replace the hyphen with the block identifier, as shown in the following examples:

  • before="-"

    Places the block at the top of the sidebar, before other blocks.


    Places the block at the bottom of the sidebar, after other blocks.
  • Code to Position CMS Blocks
    <block type="cms/block" before="-" name="left.permanent.callout">
    <block type="cms/block" before="some-other-block" name="left.permanent.callout">
    <block type="cms/block" after="-" name="left.permanent.callout">
    <block type="cms/block" after="some-other-block" name="left.permanent.callout">