check Home page Or Not condition in magento

<?php

$routeName = Mage::app()->getRequest()->getRouteName();

$identifier = Mage::getSingleton(‘cms/page’)->getIdentifier();

if($routeName == ‘cms’ && $identifier == ‘home’) { ?>

<?php echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘footer_links’)->toHtml();?>

<?php  }

else {

echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘footer_links2’)->toHtml();

}

?>

Leave A Comment