Chris Reedy
Chris Reedy

Reputation: 443

Magento - Add Some HTML on All Pages of my Theme After_Body_Start

I am trying to add a bit of HTML to every page of my theme in the after_body_start section of the page.

I created a template here with the following contents app/design/frontend/custompackage/genesis/template/page/custom/siteCanvasAdjustment.phtml:

<p>Hello World</p>

In my local.xml file located here: app/design/frontend/custompackage/genesis/local.xml, I have added the following line of code:

<layout version="0.1.0">
<default>    
<reference name="after_body_start">
<bock type="core/template" name="siteCanvasAdjustment" as="siteCanvasAdjustment" template="page/custom/siteCanvasAdjustment.phtml" output="toHtml" before="-" />
</reference>
</default>

However, "Hello World" is still not rendering on the page. I verified that the theme is successfully installed. Changes that I have made to the head.phtml file and placed in my theme work. Also, changes such as the following in local.xml work fine:

<reference name="head">
    <action method="removeItem"><type>skin_js</type><name>js/slideshow.js</name></action>
</reference>

Any idea what I am doing wrong? I am new to Magento and read up on all the tutorials but am clearly missing something.

Upvotes: 1

Views: 4746

Answers (1)

stevensagaar
stevensagaar

Reputation: 58

Your local.xml should be under layout folder not directly under theme folder, also your block has spelling mistake it says bock instead of block.

Hope it helps

N.B Don't forget to clear cache.

Cheers S

Upvotes: 4

Related Questions