Updated 14 December 2016
Magento is one of the most popular and open source ecommerce platform in the current era.
In this blog we are going to retrieve the CMS Page data for any CMS Page that is available in our website.
Load Model for CMS
1 |
$model = Mage::getModel('cms/page'); |
Load Collection Based on the Identifier (Identifier is used differentiate between different CMS pages)
1 2 3 4 5 6 |
$cmsCollection = $model->getCollection() ->addFieldToSelect('title') ->addFieldToSelect('identifier') ->addFieldToSelect('content') ->addFieldToFilter('identifier', $identifier) ->getLastItem(); |
Get CMS data
1 2 |
$cmsCollection->getTitle(); $cmsCollection->getContent(); |
Now we are good to go we can process this CMS data where ever we feel like.
Happy coding !!
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.