Magento 1.9 – Custom Module Page Layout Not Showing in CMS Dropdown

cmscms-pagescustom-modulelayoutmagento-1.9magento-1.9.0.1module

I have created a new for unique page layouts to be used for certain within . The module appears and is enabled in admin > configuration > advanced menu.

Despite this, the option for the page layout does not appear in

CMS > Pages > Home > Design Tab >Layout drop down menu.

I created the following file in: app > code > local > Custompage > Templates > etc > config.xml

<?xml version="1.0"?>
<config>
<modules>
    <Custompage_Templates>
        <version>0.1.0</version>
    </Custompage_Templates>
</modules>
<global>
    <page>
        <layouts>
            <one_column_home translate="label">
                <label>1 column home page</label>
                <template>page/1column-home.phtml</template>
                <layout_handle>page_one_column_home</layout_handle>
            </one_column_home>
            <!-- add more layouts here -->
        </layouts>
    </page>
</global>
</config>

I also have created the following file: app > etc > modules > Customepage_Templates.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Customepage_Templates>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Page />
            </depends>
        </Customepage_Templates>
    </modules>
</config>

Finally I have created a copy of 1column.phtml in: app > design > frontend > mypackage > mytheme > template > page > 1column-home.phtml

A fresh pair of eyes and help would be appreciated.

Best Answer

Most probably you may be missing helper class of your module. Create a helper class of your module by adding this code snippet inside config.xml

<global>
    <helpers>
        <custompage_templates>
            <class>Custompage_Template_Helper</class>
        </custompage_templates>
    </helpers>
</global>

Now change you custom layout open tag like this

 <one_column_home module="custompage_templates" translate="label">

Only one step remain. Define helper class inside your module.

File : app > code > local > Custompage > Templates > Helper > Data.php

<?php
Custompage_Templates_Helper_Data extends Mage_Core_Helper_Abstract
{
}