0

How to add google map under contact us page after submit button

this is the code for contact us page -form.phtml = > http://pastebin.com/rSYMpu5X

1 Answer 1

2

To add a Google Maps below your contact form you do this thru adding a stocking block thru your local.xml:

First create a static block: Name: Google Maps Identifier: googlemaps Store: Select your store Content: Insert the Google Maps include code

Next edit the local.xml file in your theme (app/design/frontend/[package]/[template]/layout/local.xml) and add the following code:

        <contacts_index_index>
                <reference name='content'>
                        <block type="cms/block" name="mapsblock">
                                <action method="setBlockId"><block_id>googlemaps</block_id></action>
                        </block>
                </reference>
        </contacts_index_index>

If there is no local.xml in your theme create one, complete XML for this file:

<?xml version="1.0"?>
<layout>
        <contacts_index_index>
                <reference name='content'>
                        <block type="cms/block" name="mapsblock">
                                <action method="setBlockId"><block_id>googlemaps</block_id></action>
                        </block>
                </reference>
        </contacts_index_index>
</layout>

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.