I need to put a couple of small images and text that runs horizontally from left to right towards the bottom of ALL pages of the site.
Position-14 looks like a suitable CMS block.
Except position-14 only shows in the homepage.
How can I show position-14 static CMS block in ALL pages?
Thanks
1 answer
Basically, if you want to add Static or non-static blocks to all pages, you just need to add them directly to template files:
PHP Code:
<?php echo $this->getLayout()
->createBlock('cms/block')
->setBlockId('your_block_id')->toHtml(); ?>
With the position-14 block in this case, depending on the layout you’re using ‘1column, 2columns-left,…’, you will edit the corresponding php file. For example, suppose that you use 2columns-left layout, open the file: \app\design\frontend\default\jm_megamalltemplate\ page\2columns-left.phtml
Underneath the block code for the <!-- MAIN CONTAINER -->, add this code snippet:
PHP Code:
<div id="jm-mass-bottom" class="jm-mass-bottom wrap clearfix">
<div class="main col3-set">
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('position-14')->toHtml(); ?>
</div>
</div>
Once done, flush all caches.