How I put static block in CMS pages?
Magento static block in cms page:
you can write some special tag in cms page for call the magento static block like:
xxxxx
How to call a static block from template files?
to add a static block into footer.phtml:
1) add a new static block (in this example Identifier is my_footer_block)
2) layout/page.xml in:
you can write some special tag in cms page for call the magento static block like:
How to call a static block from template files?
to add a static block into footer.phtml:
1) add a new static block (in this example Identifier is my_footer_block)
2) layout/page.xml in:
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
add a:
<block type="cms/block" name="my_footer_block"><action method="setBlockId"><block_id>my_footer_blockblock_id>action>block>
so in this example it will looks like:
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
<block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
<block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
<block type="cms/block" name="my_footer_block"><action method="setBlockId"><block_id>my_footer_blockblock_id>action>block>
block>
3) in footer.phtml - comment default links and add your block call:
<div class="informational">
//echo $this->getChildHtml() ?>
echo $this->getChildHtml('my_footer_block') ?>
div>
PS. but to add a link to your footer links you can always use this construction:
<reference name="footer_links">
<action method="addLink" translate="label title"><label>Your Pathlabel><url>your/path/url><title>Your Pathtitle>action>
reference>
Hope this will help :)
Comments
Post a Comment