Magento for B2B Commerce, 2.2.x

Magento 2.2.x Notice: As outlined by the Magento Software Lifecycle Policy, Magento 2.2.x has reached the End-of-Support and will no longer receive quality fixes or documentation updates. To maintain your site's performance, security, and PCIPayment Card Industry: Refers to debit and credit cards and their associated businesses. compliance, upgrade to the latest version of Magento.

The online Magento 2.2.x User Guide is scheduled for removal, but will remain available in PDF for Open Source, Commerce, and Commerce for B2B.

Controlling Block Order

Sometimes more than one content element is assigned to the same structural block. For example, there might be several block that appear in a sidebarThe right or left column of a two-column page layout.. You can control the order of blocks by including 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.

    after="-"

    Places the block at the bottom of the sidebar, after other blocks.
  • Code to Position Content 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">