2

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.

0

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
{
}
| improve this answer | |
0

After a few minutes away from the screen, I noticed what I had done wrong.

In the file: app > etc > modules > Customepage_Templates.xml I had the module name incorrect, there was a rogue 'e' in the name 'Customepage_Templates'

I adjusted it to the correct name specified: 'Custompage_Templates'

<?xml version="1.0"?>
<config>
    <modules>
        <Custompage_Templates>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Page />
            </depends>
        </Custompage_Templates>
    </modules>
</config>
| improve this answer | |

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.