I would like to know how to add a block at the very top of every page in my website.

It would be just a 'bar' with the purpose of displaying important information periodically, like - for example - when I am on holiday and unable to process orders. Or perhaps when there is a promotion running.

It's position would be above the site's header section - exactly where the cookie restriction banner gets placed by default.

Ideally I'd like it to be a block so that it's easily enabled/disabled and edited.

1 Answer 1


You can add it easily via layout update file, local.xml for example.

    <reference name="after_body_start">
        <block type="cms/block" name="my_static_block">
            <action method="setBlockId"><value>my_static_block</value></action>

Now you just have to create a static block with my_static_block identifier, put some content in and you are 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.