PHP Magento Tips

Display CMS Page Content in Template file and Template File Content in CMS Page in Magento

Rate this posting:
{[['']]}

1. Display Template File Content in CMS Page:

In CMS page content add below code:

{{block type="core/template" template="templatefolder/template_file.phtml"}}


2. Display CMS Page Content in Template File:

In template file add below code:

<?php echo  $this->getLayout()->createBlock('cms/block')->setBlockId('did-you-know')->toHtml() ;?>


if above code not work then try with below code.

$page = Mage::getModel('cms/page')->load('home','identifier');
echo $page->getContent();
Tag : Magento
0 Comments On "Display CMS Page Content in Template file and Template File Content in CMS Page in Magento"

Back To Top