1

I want to modify the layout in page.xml in layout folder for the cms home page.

This is the original xml code,

<block type="core/text_list" name="content" as="content" translate="label">
<label>Main Content Area</label>
</block>

This code seems to pull whatever you type in the cms home page via the admin area.

So I want to add a custom block inside that block, such as,

<block type="core/text_list" name="content" as="content" translate="label">
 <label>Main Content Area</label>
 <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
</block>

And it works. But what about adding a custom block that I want to create under app/design/frontend/MY_LOCAL/template/cms/default/home.phtml ?

<block type="core/text_list" name="content" as="content" translate="label">
 <label>Main Content Area</label>
 <block type="page/html_content" name="content" template="cms/default/home.phtml"/>
</block>

Nothing come out. Magento is not pulling that block of template file at all.

Any ideas?

2
  • Does setting the type to core/template help? Commented Aug 18, 2013 at 19:31
  • sorry, I don't understand your question... Commented Aug 18, 2013 at 19:52

1 Answer 1

1

I think there are two issues here. For one, the type or class on your block might be wrong and second, the name should be unique.

<block type="core/text_list" name="content" as="content" translate="label">
 <label>Main Content Area</label>
 <block type="core/template" name="some_random_name" template="cms/default/home.phtml"/>
</block>
2

Your Answer

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.