Magento Custom Page Layouts
This has been covered numerous times before, but has always been absent from this blog. Here it is for the benefit of my colleagues and anybody else who might be interested. In a nutshell, let’s say you need a brand new page layout because all the 1-column, 2-column and 3-column layouts just ain’t cutting it. Let’s push the boat out and say that we now need a 5 column layout!
Rather than editing any core files, you can do this simply by extending. You can use then use your new layout on product, CMS, category or any other specified pages.
<?xml version="1.0"?> <config> <modules> <Creare_Newlayouts> <version>0.1.0</version> </Creare_Newlayouts> </modules> <global> <page> <layouts> <five_column_layout translate="label"> <label>Five Column Layout</label> <template>page/five-columns.phtml</template> </five_column_layout> <!-- add more layouts here --> </layouts> </page> </global> </config>
The next step is to obviously create your layout file within the page directory. And don’t forget to complete your module by activating it in app > etc > modules > Creare_Newlayouts.xml
In the example above I had created several other page layouts ‘SEO Page’ and ‘Grouped Product with Ajax’ – no need to digress any further… Enjoy!