Custom Magento CMS page layout

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!
59 comments
Ohh you save my day, thank you very much for this information
Hi, Does any one know how to integrate AMP in Magento without extentions? With this I will be able to load my page quickly. Thanks for your time.
Hello Ivan, Thanks for posting such a wonderful tutorial. I followed the and can it works perfectly. I have a question specific to my problem. I created one layout βxyzβ which works fine, but themeβs local.xml has
This creates problem for me, no matter what layout I choose, it prepends the block into content block.
can I exclude this block for my newly created layout? If yes, how and where exactly?
Its ok if this block is default but for few layouts I dont wont this block be prepended.
Thanks in Advance.
Please delete all my previous comments, as those were attempt of posting code, but it was getting truncated. π
Any one please answer, its urgent π
Hi Ivan, thanks for a great quick tip. I would just add that in your config.xml you can also add
and then you can bind layout updates in your modules and custom pages. Eg. this if you want to change header template for this specific layout:
Cheers, Jan
Hi, i used the same steps and created custom home page layout in my local server. But after moving it into live server, i cant see that page layout at back-end. My magento version is 1.9.2.4. Can you help. Thanks in advance.
I have the same issue – works fine on local machine but when pushed live it doesn’t work. Any advice?
So better way it to create a new layout.
http://www.sundataplus.com/adding-a-new-page-layout-to-magento-1-x/
That’s pretty much the same… Don’t shamelessly advertise your blog like that.