2

How can I change Magento's default page template for product detailed/ single/ description page?

By default, it is always pulling this template,

 frontend\MY_WEBSITENAME\default\template\page/2columns-right.phtml 

What about if I want it to pull this layout instead?

2columns-left.phtml 

so the path should be,

frontend\MY_WEBSITENAME\default\template\page/2columns-left.phtml 

Any ideas?

EDIT:

local.xml,

<?xml version="1.0"?> <layout> <default> <remove name="paypal.partner.right.logo"/> <remove name="tags_popular"/> <remove name="right.permanent.callout"/> </default> <catalog_category_default translate="label"> <reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> </reference> </catalog_category_default> </layout> 

EDIT 2:

catalog.xml,

change,

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

to

<reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> </reference> 

1 Answer 1

6

This question has been asked before several times, I think this link might help you.

It comes down to adding the <setTemplate> tag to the root of the page in the layout xml

It should look something like this:

<catalog_product_view> <reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> </reference> </catalog_product_view> 
13
  • thanks. I had tried it but it does not work. please see my edit above. Commented Aug 18, 2013 at 19:38
  • In what file did you do this? Could you maybe update your question with some XML snippets and file names? Commented Aug 18, 2013 at 19:39
  • 1
    I've updated my answer, for the page you're trying to change you should use catalog_product_view. The only place you need to do this is the local.xml. This layout XML is always loaded last. Commented Aug 18, 2013 at 19:47
  • 1
    Glad to have helped Commented Aug 18, 2013 at 19:51
  • 1
    You can read more on layout on magentocommerce.com/knowledge-base/entry/… In your case use <reference name="left"> to target the left column Commented Jan 16, 2014 at 13:58

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.