How to add Static Blocks to a Magento Contact Page

Adding Static Block to your standard Magento contact page is very useful (I usually make 1 above the form and 1 below.)… Simply follow these instructions:

  • Make your static blocks in Magento, I called mine contact_form_abovecontact_form_below (in Backend | CMS | Static Blocks).
  • Find your contact.xml file – usually it’s in: public_html/app/design/frontend/default/YOUR-TEMPLATE/layout/
  • Add the following code for each block in the <reference name=”content”> area.
<block type="cms/block" name="YOURSTATICBLOCKNAME">
<action method="setBlockId"><block_id>contact_form_above</block_id></action>
  • Save, & don’t forget to cache refresh (Backend | System | Cache Management).
  • For reference here’s the code for a contact page showing a static block above and below the contact form…
<layout version="0.1.0">
<reference name="footer_links">
<action method="addLink" translate="label title" module="contacts" ifconfig="contacts/contacts/enabled"><label>Contact Us</label><url>contacts</url><title>Contact Us</title><prepare>true</prepare></action>

<contacts_index_index translate="label">
<label>Contact Us Form</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
<action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action>
<reference name="content">

<block type="cms/block" name="cms_contact_form_above">
<action method="setBlockId"><block_id>contact_form_above</block_id></action>

<block type="core/template" name="contactForm" template="contacts/form.phtml"/>

<block type="cms/block" name="cms_contact_form_below">
<action method="setBlockId"><block_id>contact_form_below</block_id></action>

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Buzzboost Feedburner WordPress Testimonials Integration

Next Post

How to Add The Minimum Quantity Next to the Headline Price in Magento

Related Posts