I am trying to use $this->getChildHtml('head')
from inside a page/html/header.phtml
file in Magento.
Using $this->getChildHtml('head')
inside thh page/1column.phtml
file works as expected.
Can someone point me in the right direction to understand how the magic $this
is used within templates?
I think this Stack overflow question, Magento - using $this->getPriceHtml on custom page template is on the right lines, but I'm still missing something. Thanks
You are getting in to "world inside a world that is bigger than the world that you are inside" syndrome here. You can't use it because head is not defined a child of your block that you are currently in.
try this instead:
<?php echo $this->getLayout()->getBlock('head')->toHtml();?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With