I'm trying to create my first Magento template from scratch. I created my local.xml file under app/design/frontend/default/my_theme/layout/
In it, I've referenced my preferred layout:
<new_layout translate="label">
<label>Medtech</label>
<reference name="root">
<action method="setTemplate"><template>page/home.phtml</template></action>
<!-- Mark root page block that template is applied -->
<action method="setIsHandle"><applied>1</applied></action>
</reference>
</new_layout>
My home.phtml template is located under app/design/frontend/default/my_theme/template/page/
But, it's not loading this layout file when I navigate to my home page. (It appears to be loading one of the default template layouts).
What am I doing wrong?
1 Answer 1
You have to set from admin panel
steps as per below
1) Open your admin panel.
2) Go to System>> Configuration>> Design Tab
3) change the fields as per below fields
enter image description here
4) Save config and run on front end side. It will definitely work.
I never seen the tag like "new_layout" in xml but one Suggesstion is that If you want to change the home page layout 1 column to 3 columns then then use below code in local.xml file.
<cms_index_defaultindex>
<reference name="root">
<action method="setTemplate"><template>page/3columns.phtml</template></action>
</reference>
<reference name="content">
<block type="core/template" name="default_home_page" template="cms/default/home.phtml"/>
</reference>
</cms_index_defaultindex>
-
Thanks! That worked perfectly. As far as the "new_layout" tag, I got it from the Magento wiki: tiny.cc/sbto9w. It seems to be working fine so far, so I think I'll leave that part for now.Christina Huggins Ramey– Christina Huggins Ramey2014年01月14日 17:22:20 +00:00Commented Jan 14, 2014 at 17:22
-
Yes @ChristinaHugginsRamey That is Good just reuse the exciting Tags.Keyul Shah– Keyul Shah2014年01月15日 02:43:35 +00:00Commented Jan 15, 2014 at 2:43