i need to display some more links in footer. i created those links in magento admin as static blocks (id = sample_links ).
and then i added following code page.xml file
<reference name="foot_lnk">
<block type="cms/block" name="sample_block" before="-">
<action method="setBlockId"><block_id>sample_links</block_id></action>
</block>
</reference>
i called this one in footer.phtml as,
<?php echo $this->getChildHtml('foot_lnk') ?>
but it does not display the CMS static block content. what is the issue?.
The reference is the block previously defined that you want your block to be inside, e.g.:
Then
You can call a statick block like:
And call a block like:
Visit magevn.com to see more usecase to use block in magento.
change your reference name to footer
like
then it will work.
If you don't want to bother with XML, same as swapnesh's answer, I'm just making it clearer for the php noobs out there (like me)
your_identifier is the code you decide to use when creating your block in CMS > Blocks > Create New Block, second line called "Identifier"