Thursday, November 19, 2015

Get cms page url in magento

<?php
$pageid=1;
echo Mage::helper('cms/page')->getPageUrl($pageid); ?>

Or
In controller or .phtml file:
<?php echo $this->getUrl('whats_new');?>

or
<?php echo Mage::helper('cms/page')->getPageUrl('url_key'); ?>

Or
In CMS Page
{{store _direct="url_key"}}

1 comment:

  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

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method... magento 2

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method and must therefore be declared abstract or implement the remaining met...