Friday 24 May 2013

Get Page detail by page id in magento

Get Page tilte


echo Mage::getModel('cms/page')->load(3)->getTitle();  // Here 3 is page id


Get Page content


echo Mage::getModel('cms/page')->load(3)->getContent(); // Here 3 is page id


Get Page Url


echo Mage::helper('cms/page')->getPageUrl(3) ; // Here 3 is page id


Get excerpt


$full_content = Mage::getModel('cms/page')->load(3)->getContent(); // Here 3 is page id
$excerpt = strip_tags(substr($full_content,0,200));  // Here 200 is character length.
echo $excerpt;

3 comments:

  1. The blog was absolutely fantastic! Lot of great information which can be helpful in some or the other way. Keep updating the blog, looking forward for more contents...Great job, keep it up..
    magento development company in bangalore 

    ReplyDelete
    Replies
    1. Thanks we will add you more comments. Thanks for visit

      Delete
  2. This is a great post. I like this topic.This site has lots of advantage. It helps me in many ways.Thanks for posting this again.
    magento development company in bangalore 

    ReplyDelete

Thanks for visit blog.