{"id":30,"date":"2009-07-07T21:38:00","date_gmt":"2009-07-07T21:38:00","guid":{"rendered":"http:\/\/www.codeboss.in\/web-funda\/?p=30"},"modified":"2009-07-07T21:38:00","modified_gmt":"2009-07-07T21:38:00","slug":"create-new-layout-in-magento","status":"publish","type":"post","link":"https:\/\/codeboss.in\/web-funda\/2009\/07\/07\/create-new-layout-in-magento\/","title":{"rendered":"Create New Layout In Magento"},"content":{"rendered":"<p>Magento comes in-built with a few page layouts like 1 column, 2 columns with left bar, 2 columns with right bar etc.<br \/>If you want to <strong>add new layouts<\/strong> of your own follow these steps.<\/p>\n<p>1. Open file \/app\/etc\/local.xml<br \/>2. Just before the &lt;\/global&#038;gt tag add the following<\/p>\n<pre class=\"brush: php;\">\n<cms>\n<layouts>\n<homepage>\n<label>Home Page<\/label>\n<template>page\/home-page.phtml<\/template>\n<layout_handle>home_page<\/layout_handle>\n<\/homepage>\n<\/layouts>\n<\/cms>\n<\/pre>\n<p><strong>If you are using the latest version of Magento replace &lt;cms&gt; with &lt;page&gt;. I am not sure from which version this change was made. Just try both and any one will fit (as of now that is :P)<\/strong><\/p>\n<p>The above xml will do the following &#8211;<br \/>    &nbsp;&nbsp;&nbsp;a> Add a new layout whose template will be defined in file home-page.phtml using the &lt;template&gt; tag.<br \/>    &nbsp;&nbsp;&nbsp;b> The layout will be called homepage.<br \/>    &nbsp;&nbsp;&nbsp;c> The name displayed while choosing the layout from the backend will be &#8216;Home Page&#8217; defined in the &lt;label&gt; tag.<br \/>    &nbsp;&nbsp;&nbsp;d> The handle of this page will be &#8216;home_page&#8217; defined in the &lt;layout_handle&gt; tag.<\/p>\n<p>3. Now create a file at \\app\\design\\frontend\\{package_name}\\{theme_name}\\template\\page called home-page.phtml<br \/>4. Write the new template layout code in this file.<\/p>\n<p>To make use of this layout &#8211;<br \/>1. Go to CMS->Manage Pages in the admin.<br \/>2. Open the CMS page you want this layout to be applied by clicking preview.<br \/>3. Choose &#8216;Custom Design&#8217; from the left tab.<br \/>4. From the &#8216;Layout&#8217; drop down choose &#8216;Home Page&#8217;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento comes in-built with a few page layouts like 1 column, 2 columns with left bar, 2 columns with right bar etc.If you want to add new layouts of your own follow these steps. 1. Open file \/app\/etc\/local.xml2. Just before the &lt;\/global&#038;gt tag add the following Home Page page\/home-page.phtml home_page If you are using the&hellip; <a class=\"more-link\" href=\"https:\/\/codeboss.in\/web-funda\/2009\/07\/07\/create-new-layout-in-magento\/\">Continue reading <span class=\"screen-reader-text\">Create New Layout In Magento<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[54,57],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-magento","tag-php","entry"],"_links":{"self":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":0,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"wp:attachment":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}