3

I want to change contact us page layout from current 2columns-rightlayout to 1column layout, i have no idea how to do that.

3 Answers 3

5

there is two method to do that

Method 1

app/design/frontend/base/default/layout/contacts.xml

copy to your theme

app/design/frontend/yourpackage/yourtheme/layout/contacts.xml

change

<action method="setTemplate"><template>page/2columns-right.phtml</template></action>

to

<action method="setTemplate"><template>page/1column.phtml</template></action>

Method 2

app/design/frontend/yourpackage/yourtheme/layout/local.xml

if there add below or else create new local.xml

<?xml version="1.0"?>
    <layout version="0.1.0">
        <contacts_index_index>
            <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        </contacts_index_index>
    </layout>
6

Open your theme's contacts.xml file,

located In:

app/design/frontend/[your_theme]/[your_theme_name]/layout/contacts.xml

And find this node <contacts_index_index> action and find

<action method="setTemplate"><template>page/2columns-right.phtml</template></action>

replace it with below code :

<action method="setTemplate"><template>page/1column.phtml</template></action>
0
3

your layout handle is

contacts_index_index

Next, find the layout handle in your contacts.xml file

<contacts_index_index translate="label">
    <label>Contact Us Form</label>
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
        <action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action>
    </reference>
    <reference name="content">
        <block type="core/template" name="contactForm" template="contacts/form.phtml"/>
    </reference>
</contacts_index_index>

Change the setTemplate call to reference your template

<reference name="root">
    <action method="setTemplate"><template>page/1column.phtml</template></action>
    <action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action>
</reference>

Alternately, add the handle reference to your local.xml file. The local.xml file is applied last, so whatever goes in there "wins"

<layout>
    <contacts_index_index>
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>    
        </reference>
    </contacts_index_index>
</layout>

I hope this will help you.

1

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.