- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
static blocks
how can i Add static blocks to navigation dropdown
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: static blocks
Hi ,
You can add static block using below ways in navigation dropdown.
Call a Static Block to your .xml files in Magento: Go to your .xml file in your LAYOUT folder. Just paste this code:
<block type="cms/block" name="cms_test_block" before="-">
<action method="setBlockId"><block_id>cms_test_block</block_id></action>
</block>
You can call it by it’s name in file .phtml
<?php echo $this->getChildHtml('cms_test_block') ?>
Call a Static Block to your .phtml files in Magento: Go to your .phtml file, where you would like that static block to appear, then paste this code:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId(cms_test_block)->toHtml() ?>
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!