|
MagentoECG - 14 April 2011 11:06 AM
<reference name="header"> doesn’t work
The reason, that the header block has own template and all children html should be called from that template
smth like:
// somewhere in template <?php echo $this->getChildHtml('cart_sidebar') ?>
Works now… So to rephrase. If I want to hook a Block MY into another Block X that has a type attribute that references an existing template file, then I need to (1.) reference Block X in Block MY and (2.) add a
<?php echo $this->getChildHtml('cart_sidebar') ?>
Call somewhere in that template file referenced by Block X’s type attribute ?!
----
MagentoECG - 14 April 2011 11:06 AM
<reference name="top.links"> doesn’t work
This block accepts only specific data format and can not be used as container for other blocks
How do I know such things ? Is there a pattern ?
----
MagentoECG - 14 April 2011 11:06 AM
<reference name="top.menu"> doesn’t work
Can not say anything as it should work well. Probably you hadn’t refreshed the cache that time
You were right
----
MagentoECG - 14 April 2011 11:06 AM
<reference name="top.container"> works
Yeah, and the reason that block type “page/html_wrapper” is handling his children in
protected function _toHtml() { $html = empty($this->_children) ? '' : trim($this->getChildHtml('', true, true)); /// ***
So is this the default behaviour that allows that referencing of blocks described in http://www.magentocommerce.com/design_guide/articles/intro-to-layouts#head-rules-of-XML ?
|