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

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -