Sunday, September 4, 2011

Mangento: Create a New Structural Block Using Local.xml

Version: Magento 1.x

Create a new structural block without making changes to default theme layout files e.g. page.xml.

Add the following to local.XML to create a new structural block with name “newblock”.

<layout version="0.1.0">
        <reference name="root">
            <block type="core/text_list" name="after_head_start"/>

Add content blocks as normal and render the structural block (as standard) in .phtml files e.g.
<?php echo $this->getChildHtml('newblock') ?>

No comments:

Post a Comment