Last week I had a request to add new custom layout for few cms pages in one Magento shop. It’s really useful for different static pages of your shop. First create extension with only config file in it: app/code/local/Inchoo/AdditionalCmsPageLayouts/etc/config.xml
| <?xml version="1.0"?> <config> <global> <page> <layouts> <custom_static_page_one> <label>Custom static page 1</label> <template>page/custom-static-page-1.phtml</template> </custom_static_page_one> </layouts> </page> </global> </config> |
Then activate it: app/etc/modules/Inchoo_AdditionalCmsPageLayouts.xml
| <?xml version="1.0"?> <config> <modules> <Inchoo_AdditionalCmsPageLayouts> <codePool>local</codePool> <active>true</active> </Inchoo_AdditionalCmsPageLayouts> </modules> </config> |
Clear cache, add your page/custom-static-page-1.phtml template file (or copy some default one for start) to your current theme and you’re done There is also tutorial about this on Magento Wiki. And yes, default Magento page layouts can be overridden the same way. Default layouts config can be found in app/code/core/Mage/Page/etc/config.xml along with used xml code structure, so check it out. Thank you for listening!
For more information visit: http://blog.sulopastore.com/custom-magento-cms-page-layout/#more-2065