Magento – How to get secure url (https) of CMS page using url_key

cmshttpsmagento-1.7sslurl

I have enable SSL and one of CMS is restricted for register users.

And this page is in footer.

If logged in user try to access without https it fails and redirect to my account.

I want that particular CMS page url alway secure ie https://

<?php echo $this->getUrl('page_url_key',array('_secure'=>true));?> is not working.

How I will get CMS page url alway secure?

Best Answer

You have to use _type => 'direct_link'

Mage::getUrl('page_url_key', array( '_nosid' => true, '_store' => 'default', '_type' => 'direct_link' ));

Related Topic