问题
I need to display a CMS page inside my custom module's phtml file. Is there any way I can include it either through xml layout or via coding directly in phtml file? I know we can add a cms block but how can we add a cms page?
回答1:
Try the below code in your phtml file
$page = Mage::getModel('cms/page')->load('home_page','identifier');
echo $page->getContent();
回答2:
This code check if cms page is active then it will display page content
$page = Mage::getModel('cms/page')->load('top_offer','identifier');
echo $page->getIsActive()?$page->getContent():'';
来源:https://stackoverflow.com/questions/12816467/how-to-call-a-cms-page-in-a-phtml-file-in-magento