php - Magento custom module adds HTML block to header -
i'm creating custom module magento , cleanest way found add html code header create own block in module , add php code render block in template header.phtml.
i'm wondering there way less intruding having codes in module folder?
thanks :)
<reference name="header"> <block type="your_module/yourblockclass" name="yourblockname" template="your_module/yourtemplate.phtml"/> </reference>
add code above default-layout-handle in custom layout.xml
file. fetch block via
$this->getchildhtml('yourblockname')
from within header.phtml
file.
good luck!
Comments
Post a Comment