0

I am trying to remove a block and switch the product page to 2-columns right. Here is the code-

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <default>
        <reference name="left">
            <remove name="catalog.leftnav" />
        </reference>
    <catalog_product_view>
         <reference name="root">
             <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
         </reference>
    </catalog_product_view>
    </default>
</layout>

I have it placed in app/design/frontend/default/themename/layout

I have flushed the cache and made sure the proper theme is selected in system-->configuration-->design

0

Your layout file is not correct. You are defining a layout handle in another layout handle. Please try below layout code:

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <default>
        <reference name="left">
            <remove name="catalog.leftnav" />
        </reference>
    </default>
    <catalog_product_view>
        <reference name="root">
             <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
    </catalog_product_view>
</layout>

I hope it will help..

1
  • I have spent about 6 hours working on this and that did it. Thank you so much. – Tyler Jensen Oct 13 '16 at 15:36

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.