1

I am creating a magento theme. I set 2columns-right layout for all page. Now I want to create a template and set 1columns layout for home page from local.xml. But admin home page cms selected layout still remains and my created and admin home page cms content both still show. So how can I avoid admin home page cms layout and content without disable and set 1columns layout for home page. Any suggestion and help are appreciated. Thank you.

Here is my code:

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <!-- Global Operations -->
    <default>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-right.phtml</template>
            </action>
            <reference name="content">
                <block type="core/template" name="some_random_name" template="cms/home.phtml"/>
                <action method="setTemplate"><template>page/1column.phtml</template></action>
            </reference>
        </reference>
    </default>
</layout>
2
  • why don't to make the home page as 1 column from admin? – Dexter Oct 22 '14 at 4:15
  • because i want to sale this theme future. So If any buy my theme then he can easily see my home page – user2365514 Oct 22 '14 at 5:45
1

Afaik is this not possible. Every change you make in the backend has higher priority than any config file.

This is true for:

  • layout changes
  • store configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.