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?

  • Does setting the type to core/template help? – Sander Mangel Aug 18 '13 at 19:31
  • sorry, I don't understand your question... – laukok Aug 18 '13 at 19:52
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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.