2

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.

3

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

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

Now you just have to create a static block with my_static_block identifier, put some content in and you are done.

| improve this answer | |

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.