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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -