Search code examples
magento-1.4magento-1.5magento

Whats The best practice to Change a magento page from 3column to 2column?


the default layout of Category page is 3column, I would Like to change it to 2 column. I read a lot of blogs and fourm topics about changing the column layouts. Some say to make changes in layout.xml and some say to make changes in page.xml which made me a bit confused, i would like to ask what ll be the best practice to deal with such tasks. eg If I would like to keep same layout for all pages say i want a 2 column layout for every page, would it need some different approach if i would like only a single page(Say Category Page) with 2 column ?


Solution

  • There are actually 3 places you can change the page layout in a theme. How you want to do it depends on your preference and how globally you want to apply the change. local.xml and page.xml are both equally viable is you want to make a global change to a page group (categories, products, CMS). Some people prefer to put these changes in local.xml because if you ever need to go back to a default layout you can just remove the local.xml file and clear the cache.

    The third way is to override the page style at the Category/Product/CMS configuration within Magento Admin. You would use this in a case where you have a all Category pages as 2 column but you need only one of them to be a 1 column layout. In Categories you would go to Catalog->Categories->Manage Categories, select the category you want to change, select the Custom Design tab, select a new layout under Page Layout, then click Save Category. You may need to clear your cache to see the changes depending on which version of Magento you use.