0

I currently have a static block that appears in the left column. I'm looking to have it display at the top of the page instead.

Is there an easy way to do this or do I need to delete and start over?

2
  • have you tried Googling this ? Commented Oct 8, 2015 at 15:28
  • @Melissa15 did you manage to find a solution to your question? Commented Nov 10, 2015 at 14:20

2 Answers 2

5

The first thing you'll need to do is find the static block in the layout XML files. It's probably located in your active templates local.xml, you can recognize it by it's identifier. It'll look something like this

<reference name="left">
   <block type="cms/block" name="some_name">
      <action method="setBlockId"><block_id>[identifier-as-set-in-backend]</block_id></action>
   </block> 
</reference> 

Now take the whole <block/> part from the left reference, we'll add it to a new reference. Find the <default/> node and search for the <header/> node in there, if it doesn't exist create it. Now add the copied <block/> node in there. It would look something like this

<default>
   <reference name="header">
       <block type="cms/block" name="some_name">
          <action method="setBlockId"><block_id>[identifier-as-set-in-backend]</block_id></action>
       </block>
   </reference>
</default>

Now open up the header.phtml file in your template. It should be located under app/design/frontend/[templatename]/[packagename]/template/page/html/header.phtml

In there, find the place you want to add the block and add

<?php echo $this->getChildHtml('some_name');?>
0

There are several ways to add static blocks to the left column, the easiest one that's usually used by theme developers and forgotten by everybody else is Widget Instances.

1. Find the Widget Instance:

In the admin panel, go to CMS > Widget Instances and filter by Type "CMS Static Block". Go through them and check the "Widget Options" tab if you find the name of your static block.

2. Move it:

If you found it, go to the "Frontend Properties" tab and change "Left Column" to "Page Top" (You can also try "Page Header" or "Navigation Bar" if it should not be right at the beginning of the body element):

screenshot

Save, clean the cache and you're done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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