I have a category in my store that requires a totally different layout to the standard Magento layouts. So I created a new copy of the 1column.phtml and renamed it and made one small change to test.
Now the problem is that the custom layout is not showing up. I created a module (which is working as it is seen in the Admin > Config > Advanced overview).
My files and contents are as follows:
app/etc/modules/Test_Page.xml
<?xml version="1.0"?>
<config>
<modules>
<Test_Page>
<active>true</active>
<codePool>community</codePool>
<version>0.1.0</version>
<depends>
<Mage_Page />
</depends>
</Test_Page>
</modules>
</config>
app/code/local/Test/Page/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Test_Page>
<version>0.1.0</version>
</Test_Page>
</modules>
<global>
<page>
<layouts>
<homepage module="page" translate="label">
<label>Homepage</label>
<template>page/home.phtml</template>
<layout_handle>homepage</layout_handle>
</homepage>
<!-- add more layouts here -->
</layouts>
</page>
</global>
<frontend>
<layout>
<updates>
<Test_Page>
<file>test_page.xml</file>
</Test_Page>
</updates>
</layout>
</frontend>
</config>
app/design/frontend/test/default/layout/test_page.xml
<?xml version="1.0"?>
<layout>
<homepage translate="label">
<label>Home Page</label>
<reference name="root">
<action method="setTemplate"><template>page/home.phtml</template></action>
<action method="setIsHandle"><applied>1</applied></action>
</reference>
</homepage>
</layout>
I can't see anything I've screwed up, It's being read as a module but the custom layout is not being shown up 🙁
Best Answer
In order to make it appear in the layout dropdown you need to create a custom module (you can also add something in a core file but please don't do that). Let's name the extension Easylife_Layout. For this you need to create the following files:
app/etc/modules/Easylife_Layout.xml
- the declaration fileapp/code/local/Easylife/Layout/etc/config.xml
- the configuration fileapp/design/frontend/{interface}/{theme}/layout/easylife_layout.xml
- the layout fileThe last one is necessary in case you want to be able to reference your custom layout in layout files. Something like:
Clear the cache and...that's it. Le tme know if it works for you.