How To

How to Create a New Page Layout Option in Magento

Without a doubt, your Magento product page is the precious place where your customers will decide to shop or leave. To improvise sales and you have to serve better user experience with your store design that turns your store customer into returning one. By default you can change your whole store layout by changing the theme from the store backend, but what if you want to change the page layout without store layout?

Here is the complete tutorial to create your new store frontend page layout option inside your Magento 1 store. For this purpose first you need to create your own extension and then you have to create layout option in store backend for drop-down selection.

First, create “Vendor_Extension.xml” file inside your extension folder at following path.
app\etc\modules\Vendor_Extension.xml

<?xml version="1.0" encoding="utf-8"?>
<config>
 <modules>
     <Vendor_Extension>
         <active>true</active>
local
         <depends>
             <Mage_Page />
         </depends>
     </Vendor_Extension>
 </modules>
</config>

After that, you need to define your custom layout option.
app\code\local\Vendor\Extension\etc\config.xml

<?xml version="1.0" encoding="utf-8"?>
<config>
 <modules>
     <Vendor_Extension>
            <version>1.0.0</version>
     </Vendor_Extension>
 </modules>
 <global>
     <page>
         <layouts>
             <new_cms_layout module="page" translate="label">
                 <label>New Layout Option</label>
                    <template>page/custom.phtml</template>                 
             </new_cms_layout>
         </layouts>
        </page>
 </global>
</config>

Lastly, you need to write your own custom layout code “custom.pthml” file for the frontend.
app\design\frontend\Themes\Yourtheme\template\page\custom.phtml

<?php 
//Your code goes here... 
?>

That’s the final step! I hope you enjoy creating your own page layout in Magento 1.
Don’t forget to hit that stars and comment down below if you are facing an issue while using this code.
Happy Coding!

Click to rate this post!
[Total: 4 Average: 5]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

Recent Posts

Magento 2: Add Quantity Increment and Decrement on Category Page

Hello Magento Friends, In this blog, we will discuss about adding quantity increment and decrement…

2 days ago

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

5 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

7 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

7 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

1 week ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

1 week ago