In Magento 1.9 I want to add a custom block to the homepage, but nothing happens. I have these files:
app/design/frontend/[mytheme]/default/layout/local.xml
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<default>
<reference name="root">
<block type="core/text_list" name="customblock" as="customblock" translate="label">
<label>Custom Block</label>
</block>
</reference>
<reference name="customblockreference">
<block type="core/template" name="customblock" template="customblock.phtml" />
</reference>
</default>
</layout>
In homepage.phtml
<?php echo $this->getChildHtml('customblock') ?>
in app/design/frontend/[mytheme]/default/template/customblock.phtml
<h1>test</h1>
Where am I doing wrong?
homepage.phtml
in the name attribute of your reference node. But sincehomepage.phtml
is not something coming from a stock Magento, there is not much we can do to help if you do not provide us at least the layout where this parent block is declared. – β.εηοιτ.βε