2

I have just added a static block into the left bar but am sturggling to move it to a certain position! If I want to move it to the top I assumed you leave sibling blank and put after as 0.

<default>
   <reference name="left">
      <block type="cms/block" name="tester" >
          <action method="setBlockId">
            <block_id>tester</block_id>
            <siblingName></siblingName>
            <after>0</after>
          </action>
      </block>
   </reference>
</default>

The block just sits at the bottom of the left bar and I cant get it to move!

Can someone shed some light on what I am doing wrong?

2

add before="-" to show on top

<default>
   <reference name="left">
      <block type="cms/block" name="tester" before="-" >
          <!--
              The content of this block is taken from the database by its block_id.
              You can manage it in admin CMS -> Static Blocks
          -->
          <action method="setBlockId">
            <block_id>tester</block_id>
            <siblingName></siblingName>
            <after>0</after>
          </action>
      </block>
 </reference>

after that clear your cache or remove folder var/cache

4
  • That worked thanks! How about if I want to position above a static block with the identifier "recentposts" ? – KiwisTasteGood Dec 3 '15 at 12:22
  • before="recentposts" or after="recentposts" recentposts must be block name.. – Qaisar Satti Dec 3 '15 at 12:23
  • Works perfectly! – KiwisTasteGood Dec 3 '15 at 12:27
  • 1
    Yep no problem had to wait the 10 mins before I could so sorry for the delay – KiwisTasteGood Dec 3 '15 at 12:38
1

To move it to the top do this:

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

If you want to move it after a certain block do this

<default>
   <reference name="left">
      <block type="cms/block" name="tester" after="block name here">
          <action method="setBlockId">
            <block_id>tester</block_id>
          </action>
      </block>
  </reference>
</default>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.