Search code examples
magento

Set default Magento page layout to 3 columns


Is there a way to set all pages (catalog,product,cart,checkout,search) as having a 3-column layout in local.xml, instead of specifying layout for each block?

I tried the following code

<?xml version="1.0"?>
<layout version="0.1.0">
        <default>
                <reference name="root">
                        <action method="setTemplate"><template>3columns.phtml</template></action>
                </reference>
        </default>
</layout>

It's not working; the log shows

2011-08-12T07:20:10+00:00 CRIT (2): Not valid template file:frontend\base\default\template\3columns.phtml


Solution

  • As far as your error message is concerned, you are trying to load a file that doesn't exist. The filename in the error message was a huge giveaway. The page layout files are in template/page/*.phtml, not template/*.phtml.

    You need to change:

    <action method="setTemplate"><template>3columns.phtml</template></action>
    

    to..

    <action method="setTemplate"><template>page/3columns.phtml</template></action>