Layout – How to Set Default CMS Page Layout

cmslayout

I've got plenty of CMS pages to add. Each of them should use '2 colums with right column' layout. The default is '1 column'.

How can I change the default setting?

Tried this in local.xml:

<cms_page>
    <label>CMS Pages (All)</label>
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        <!-- Mark root page block that template is applied -->
        <action method="setIsHandle"><applied>1</applied></action>
    </reference>
</cms_page>

but it didn't work.

I know I can do this individually for every page, but I want to set the default setting. So I don't have to set it 100 times for every single page.

Best Answer

Simply adding this in config.xml solved the issue:

<config>
    <global>
        <page>
            <layouts>
                <one_column module="page" translate="label">
                    <is_default>0</is_default>
                </one_column>
                <!-- default page for new cms pages -->
                <two_columns_right module="page" translate="label">
                    <is_default>1</is_default>
                </two_columns_right>
            </layouts>
          </page>
Related Topic