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!