Reputation: 21587
i created the page/23columns.phtml file and a local.xml in my custom theme package called hew. now, i want to assign the root template of the "home page" in magento to this 23columns template, but it won't work… here is my local.xml
<?xml version="1.0"?>
<layout>
<default>
…
</default>
<!--Home Page-->
<cms_index_index>
<reference name="root">
<action method="setTemplate">
<template>page/23columns.phtml</template>
</action>
</reference>
</cms_index_index>
</layout>
cache is disabled and all other local.xml changes work flawlessly...
any advice?
Upvotes: 3
Views: 669
Reputation: 15216
The home page in Magento is just a simple CMS page. The setTemplate
methods don't affect the CMS pages because for them you can set the root template from the admin panel.
The interpretation of what is set in the admin panel is made after the loading of the layout xml.
This means that your template is set to 23columns.phtml
but later is changed to the value from the database.
I suggest to change the layout of the homepage from CMS->Pages->Home page.
You may not see your new layout in the available list.
This can happen if you did not declare properly your layout.
Here is a tutorial that shows you how you can do it.
Upvotes: 5