5

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?

asked Jan 14, 2014 at 16:14

1 Answer 1

4

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>
answered Jan 14, 2014 at 16:52
2
  • 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. Commented Jan 14, 2014 at 17:22
  • Yes @ChristinaHugginsRamey That is Good just reuse the exciting Tags. Commented Jan 15, 2014 at 2:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.