Created
September 3, 2013 14:42
-
-
Save cfaria/6424869 to your computer and use it in GitHub Desktop.
Show static block in template. Magento
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Check if block is active | |
$empty_category_block = Mage::getModel('cms/block')->load('block_id'); | |
if($empty_category_block->getIsActive()) : | |
echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_id'.$catid)->toHtml(); | |
endif; | |
?> | |
<?php | |
//Show static block by widget filter | |
$filter = new Mage_Widget_Model_Template_Filter(); | |
$_widget = $filter->filter('{{widget type="cms/widget_page_link" template="cms/widget/link/link_block.phtml" page_id="2"}}'); | |
echo $_widget; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment