How to call cms page content in phtml file.

  1. Create a cms page
  2. Put the code in your phtml file (where you want to the call cms page content)

Code:

<?php echo Mage::getModel('cms/page')->load('home_page_new')->getContent();?>

If there are some image url in your cms page content and you want to display on fronend use the following code:

<?php echo $this->helper('cms')->getBlockTemplateProcessor()->filter(Mage::getModel('cms/page')->load('home_page_new')->getContent());?>

working-on-a-computer-smiley-emoticon

Categories: Magento

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *