lets say there's the following hierarchy of blocks:
<block name="parent"> <block name="child" /> </block>
and I want to push a block of my own inside "parent", and put the original "child" as a child of my new block, eg:
<block name="parent"> <block name="my_block"> <block name="child" /> </block> </block>
how can I do it via layout xml?
I tried something like:
<reference name="parent"> <block name="my_block"> <action method="setChild"><name>child</name><block>child</block></action> </block> </reference>
but it didn't work (I tried calling getChildHtml('child'); ?> inside my template, and got an error.
am I doing it right? how do I update an existing block, add a block of my own, and turn one of the siblings (that were originally in parent) to be a child of my new block?