Showing posts with label CMS Page. Show all posts
Showing posts with label CMS Page. Show all posts

Tuesday 29 September 2015

Custom Magento CMS page layout

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/Metizsoft/CmsPageLayout/etc/config.xml

<?xml version="1.0"?>
<config>
 <global>
  <page>
   <layouts>
    <custom_static_page_one>
     <label>Must Login Page</label>
     <template>page/mustloginpage.phtml</template>
    </custom_static_page_one>
   </layouts>
  </page>
 </global>
</config>
Then activate it: app/etc/modules/Metizsoft_CmsPageLayout.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Metizsoft_CmsPageLayout>
            <codePool>local</codePool>
            <active>true</active>
        </Metizsoft_CmsPageLayout>
    </modules>
</config>

Clear cache, add your page/mustloginpage.phtml template file (or copy some default one for start) to your current theme and you’re done