I have created new reference "new reference" in page.xml using this link http://inchoo.net/ecommerce/magento/custom-reference-structural-block/. When i call that reference using

$this->getChildHtml('newrefernce') in theme pages its working.

When i call this in my own custom module (ie)in Local folder its not rendering that page.


> <default translate="label" module="page">
>  <block type="core/text_list" name="newrefernce" as="newrefernce"
> translate="label"></block>
> </default>

Need Help. Thanks


Try this.

    <default translate="label" module="page">
        <reference name="root">
            <block type="core/text_list" name="newrefernce" as="newrefernce" translate="label">
                <label>New Reference</label>

Note: In your case, reference node with name root is missing.

Also you need to add this

<?php echo $this->getChildHtml('newrefernce')  ?> 

to each layout template file such as 1column.phtml, 2columns-right.phtml, 2columns-left.phtml and 3-2columns.phtml and so on.

  • Xml file for my local module<reference name="root"> <action method="setTemplate"> <template>new/new.phtml</template> </action> </reference>.When i call childhtml in my new.html its not working – Nandakumar Aug 11 '14 at 13:05
  • ok, i will check.... – Amit Bera Aug 11 '14 at 13:14

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.