So here’s something I didn’t know about until 15 minutes ago. When you’re creating a Layout Update XML block, you can automatically assign a block you’ve created as a child of another block with a parent
attribute in your block tag. That means this
<block type="foo/bar" parent="block_name_in_layout" ... />
is sort of like the following (oversimplified) PHP code
$block = $layout->createBlock('foo/bar');
$parent = $layout->getBlock('block_name_in_layout');
$parent->insert($block)
Or the more verbose Layout XML code
<reference name="block_name_in_layout">
<block type="foo/bar" ... />
</reference>
Props to a benmarks tweet I ran across that made me think he was drunk until I peeked at app/code/core/Mage/Core/Model/Layout.php