Archive

Posts Tagged ‘adding page template’

Magento Notes - Adding a new page template

February 24th, 2009

In case anybody want to create a new page template to be selectable in the CMS, below are the simple steps to follow:

1. Create a a new phtml file in: app/design/frontend/default/your theme/template/page folder. Easiest way to do this is to copy one of the existing files (1column.phtml, 2columns-left.phtml, 3columns.phtml) that you will want to build on, and rename the new file to your liking.

2. Modify the config.xml in: app/code/core/Mage/Cms/etc, near line 182, you simply copy one of the existing xml block like the following:

<one_column>
<label>1 column</label>
<template>page/1column.phtml</template>
</one_column>

and rename the label to your liking (this name will be how you reference the template in the CMS, and then modify the phtml file name.  For my example below is my revised xml block:

<one_column_splash>
<label>1 column w splash</label>
<template>page/1column_splash.phtml</template>
</one_column_splash>

3. Make sure you refresh your cache, and go back into CMS and in the design section of the page, you will see the new template name in the drop down menu.

Text in green are what I have modified.  Hope people find this helpful.

The know-how for this post is obtained from Magento forum at: http://www.magentocommerce.com/boards/viewthread/1406/, and has been personally verified that it works very well. Thanks Chinesedream for the wonderful fix.

blog posting, e-commerce, magento, technical notes ,