1

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.

Page.xml

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

Need Help. Thanks

1 Answer 1

1

Try this.

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

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.

2
  • 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 Commented Aug 11, 2014 at 13:05
  • ok, i will check.... Commented Aug 11, 2014 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.