Sunday, July 8, 2012

How to get cms content from cms id in magento?

$objCmsPage = Mage::getModel('cms/page')->getCollection()->addFieldToFilter('identifier','next-day');
foreach($objCmsPage as $objCmsPageContent)
{
break;
}
$objCmsHelper = Mage::helper('cms');
$objProcessor = $objCmsHelper->getPageTemplateProcessor();
echo $objProcessor->filter($objCmsPageContent->getContent());

No comments:

Post a Comment

Please mention your comments.......