Layout update: unable to add a child block in layout XML by reference

If its a module loading issue, I think you should add a tag in your module declaration file. like below

<depends> <companyname_modulename/> </depends>

This will insure that your module will be loaded after companyname_modulename


I found out why. My extension loads first, and the extension that loads onestepcheckout_index_index is loaded after mine. Therefore, my layout update was referring to a handle that doesn't exist yet..


Just to clarify this. Several steps were necessary. First, declare the block as a child block.

<action method="setChild"><alias>my_name</alias><child>my.name</child></action>

Then add the dependency to your module declaration file. In my case it was Idev_OneStepCheckout

<depends>
    <Idev_OneStepCheckout />
</depends>

Finally, in the template it will only work if you use the alias.

echo $this->getChildHtml('my_name')