jcadima
3/24/2015 - 8:52 PM

Show CMS block on phtml files without declaring on local.xml

Show CMS block on phtml files without declaring on local.xml


<?php 
// use this to reference the static CMS block anywhere in a .phtml  file
echo $this->getLayout()->createBlock('cms/block')->setBlockId('share-this')->toHtml(); 
?> 
<!-- create a static CMS block with the following content,
and with identifier:  "share-this"          -->

<div class="row">
	<div class="col-md-12">
    <span class='st_facebook_hcount' displayText='Facebook'></span>
    <span class='st_twitter_hcount' displayText='Tweet'></span>
    <span class='st_googleplus_hcount' displayText='Google +'></span>
	</div>
</div>