I am converting an HTML template into Magento theme. Here I have to separate each blocks into custom static block files such as footermenu.phtml
, tweet.phtml
and copyright.phtml
to call like,
<?php echo $this->getChildHtml('footermenu'); ?>
<?php echo $this->getChildHtml('tweet'); ?>
<?php echo $this->getChildHtml('copyright'); ?>
After reading this blog tutorial, added a new block like the following but it is not appearing with my Magento 1.9.0.1
app/design/frontend/base/default/layout/local.xml
<?xml version="1.0"?>
<layout>
<reference name="root">
<block type="core/text_list" name="newreference" as="newreference" translate="label">
<label>New Reference</label>
</block>
</reference>
<reference name="newreference">
<block type="core/template" name="newreferenceblock" template="newreference.phtml" />
</reference>
</layout>
In app/design/frontend/base/default/template/page/2columns-right.phtml
<?php echo $this->getChildHtml('newreference') ?>
app/design/frontend/base/default/template/page/template/newreference.phtml
<h1 style="background-color:yellow">Hello New Reference!</h1>