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>
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>
| improve this answer | |
  • thanks. I had tried it but it does not work. please see my edit above. – laukok Aug 18 '13 at 19:38
  • In what file did you do this? Could you maybe update your question with some XML snippets and file names? – Sander Mangel Aug 18 '13 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. – Sander Mangel Aug 18 '13 at 19:47
  • 1
    Glad to have helped – Sander Mangel Aug 18 '13 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 – Sander Mangel Jan 16 '14 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.