How to change default Page or Category layout in Magento?


Here, I will show you how you can change the default page layout in Magento. By page layout, I mean all CMS page, category page, etc.
There are different ways to change the page layout in Magento. Here are some of them:-
Changing individual category page layout
You can modify the page layout of each individual category by the following step:-
- Go to Catalog -> Manage Categories
- Select any category
- Click the ‘Custom Design’ tab
- Select your desired page layout from ‘Page Layout’ selectbox
- Save Category and you are done!
Changing category page layout from catalog.xml file
- Open layout/catalog.xml file
- Find the node ‘catalog_category_default’
- Find the following line within the node ‘catalog_category_default’
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
- The above line has set 2columns-left layout. You can change it to your desired choice like 2columns-right, 3columns, etc.
Changing category page layout from page.xml file
This is the best option I prefer to change the default page layout.
- Open layout/page.xml file
- Under the ‘default’ node, you will find the following code:-
<block type="page/html" name="root" output="toHtml" template="page/2columns-left.phtml">
- The above line has set 2columns-left layout. You can change it to your desired choice like 2columns-right, 3columns, etc.
Hope this helps. Thanks.

0 comments:

Post a Comment