How to create custom page layout in magento

To create a new custom column layout, you need to place a new file in the Magento theme. With the Magento default theme, you could use the folder app/design/frontend/default/default/template/page, but of course - when building your own site - it is recommended to have your own theme-directory.

In the tutorial, the file 1column.phtml is copied to the file 1columnfp.phtml (where "fp" stands for the front page). To make this new page reckognizable you wll need to add a new XML-definition. In the tutorial the following code is added to the file app/code/core/Mage/Page/etc/config.xml. copy this module in local exp app/code/local/Mage/Page/etc/config.xml

    
    
    page_one_column_fp

However, with a Magento upgrade this change could be gone. The same XML could also be added to your app/etc/local.xml file instead:


    
        
            
                
                    
                    
                    page_one_column_fp
                
            
        
    

Or you can also create it in your custom module place below code in your config.xml file
 
 
            
                
                    
                    
                    page_one_column_wide
                
                
            
       
  

No comments:

Post a Comment