Adding new page layout for Magento CMS pages

Magento offers advanced e-commerce functionality, but we should not disregard classic CMS pages which fulfill your website with additional content. Commonly those pages are very rarely with content that has identical structure, so we need to create new template for them.

To make a new template, first we need to create phtml file with your template and save it in
app/design/frontend/default/your-theme/template/page
Then open local.xml (app/etc/local.xml). Somewhere on 55th line of code, right below
<session_save><![CDATA[files]]></session_save>
insert following code:

<cms>
<layouts>
<redirect>
<label>Title that will be shown in drop down menu in Admin panel</label>
<template>page/template-title.phtml</template>
</redirect>
</layouts>
</cms>

* Code must be inside <global></global> tag

Example local.xml

primer-xml

 

Result: CMS page in Admin panel with new layout.

magento cms templejt
Written by
Aleksandra Vanić

Other posts