add code snippet in magento core
Question
I'm running magento 1.4 and I'm trying to display an overlayer banner on all the pages in my magento store. In which file should I add the code snippet for the banner so that the it gets displayed on all pages? BTW: the code snippet is actually some a short php if function + an OpenX Javascript Tag
Solution
From this search:
- Go to
/admin/cms_block/
and add a block. Remember the identifier. - In your code add
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('identifier')->toHtml() ?>
There you go…
OTHER TIPS
For javascript to be included on every page have a look at page.xml layout <default>
section. For PHP code see which blocks are included on the page and create a block after (or before) one of them
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow