Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change product view page to one column layout

Tags:

magento

I am new to magento learning. can some one please guide me how to change product view page to 1 column layout. I am using magento default theme.

Thanks

like image 234
Mukesh Avatar asked Aug 30 '12 05:08

Mukesh


2 Answers

To change product view page to 1 column layout you need to open

app/design/frontend/default/default/layout/catalog.xml

Reach to following Code :

<catalog_product_view translate="label">
    <label>Catalog Product View (Any)</label>
    <!-- Mage_Catalog -->
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-right.phtml</template>
        </action>
    </reference>

Here you can change 2columns-right.phtml to 1column.phtml.

We can also use local.xml(better way) and the following code need to be added -

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

Hope it'd be helpful.

Thanks!

like image 171
aforankur Avatar answered Sep 28 '22 11:09

aforankur


I would not recommend any of those answers!

Your magento is going to break with any update!

The only good answer when you need to update any xml layout is to edit the file local.xml located in app/design/frontend/youtheme/default/layout

Simply add

<catalog_product_view translate="label">
    <label>Catalog Product View (Any)</label>
    <!-- Mage_Catalog -->
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template>
        </action>
    </reference>
</catalog_product_view>

And you're done... easy and clean.

like image 35
Slade Avatar answered Sep 28 '22 11:09

Slade