Add a Custom CMS Layout Template in Magento

Posted on February 11, 2014 | Magento 1

To add a custom template to Magento is quite simple. Please find simple instructions below:

1. Create a new module

Create the following folder path

app/code/local/PaulDonnelly/NewTemplates/etc/

Create a file called config.xml in app/code/local/PaulDonnelly/NewTemplates/etc/

Add the following snippet to config.xml

<?xml version="1.0"?>
<config>
<global>
<page>
<layouts>
<yourlayoutname>
<label>Name of your Template e.g. Standard CMS Page (One Column Left)</label>
<template>page/standard-onecol-left.phtml</template>
</yourlayoutname>
</layouts>
</page>
</global>
</config>

2. Create the Template File

Create a file called standard-onecol-left.phtml in

app/design/frontend/YourPackage/YourTheme/template/page/

You will most likely be using an existing template as a starting point. Just copy the contents from 1column.phtml, 2column-left.phtml, 2columns-right.phtml or 3columns.phtml into standard-onecol-left.phtml. In our example we will be copying the contents of 2column-left.phtml.

3. Activate your new module and CMS Layout

Create a file called PaulDonnelly_NewTemplates.xml in app/etc/modules/

Add the following snippet

<?xml version="1.0"?>
<config>
<modules>
<PaulDonnelly_NewTemplates>
<codePool>local</codePool>
<active>true</active>
</PaulDonnelly_NewTemplates>
</modules>
</config>

Upload your new module and you will see a new CMS page listed.