Adding cms block to footer links magento -


how can add cms static block footer footer links , view on specific store view ? using magento 1.9

creating static block:

  1. go magento admin panel , select cms -> static blocks
  2. then click on “add new block” button right top
  3. now fill following fields: block title: give name of static block here. not show on frontend identifier: give id of block. used reference of block, when adding template file or cms page status: define visibility of static block on frontend content: content of static block can plain text, html code , javascript.
  4. click on “save block” button.

showing static block in frontend @ footer:

go app > design > frontend > your_package > your_theme > layout. open appropriate file, lets page.xml , add following code inside <block type="page/html_footer name="footer" as="footer" template="page/html/footer.phtml""> block:

<block type="cms/block" name="your_block_id" before="-">       <action method="setblockid"><block_id>your_block_id</block_id></action> </block> 

now, refresh cache @ backend , front page see cms static block @ footer.

to include block in specific store view:

<?php $store = mage::app()->getstore()->getcode();   if($store == "your-storeview"){     echo $this->getlayout()->createblock('cms/block')->setblockid('your_block_id')->tohtml();   }   else {     echo $this->getlayout()->createblock('cms/block')->setblockid('your_block_id')->tohtml();               }   ?> 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -