-9

Using the Magento layout XML, how do I set the page to use the 2-column layout template?

closed as too broad by Keyul Shah, Marius Mar 27 '15 at 10:29

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

14

You will need to add this to the layout xml. Locate your local.xml in your theme layout folder (or create it if it doesn't exist) and set the template per page. For example for the default category pages:

<?xml version="1.0"?>
<layout version="0.1.0">
   [...]
   <catalog_category_default translate="label">
     <reference name="root">
         <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
     </reference>
   </catalog_category_default>
   [...]
</layout>

For CMS pages this can be done from the backend.

  • hi sander, I had tryied this, but not applying.. – Manoj Kumar Aug 12 '13 at 5:23
  • You should probably check if you've used the right template file and it's not overwritten – Sander Mangel Aug 12 '13 at 7:55
5

you do it via admin and can assign the template you want to home page and other page like categories and cms pages. in design tab set the value of Page Layout. which design you want to set on that product.

  • 1
    wow you're right. I completely forgot about setting templates for categories from the backend. Basicly only custom extensions need a setTemplate action from the layout XML – Sander Mangel Aug 10 '13 at 10:43

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