Contact Email:
info@jminfotech.org
jminfotech contact jminfotech gplus jminfotech skype jminfotech phone jminfotech yahoo jminfotech facebook jminfotech twitter
Blog

How to get URLS in Magento

Posted at : 24-July-2014
 

TO Retrieve URL path in PHTML

Note: In editing PHTML don't forget to enclose the following code with PHP tag


Not secure Skin URL:

<?php echo $this->getSkinUrl('images/sampleimage.jpg') ?>


Secure Skin URL

<?php echo $this->getSkinUrl('images/ sampleimage.gif', array('_secure'=>true)) ?>


Get Current URL

$current_url = Mage::helper('core/url')->getCurrentUrl();


Get Home URL

$home_url = Mage::helper('core/url')->getHomeUrl();


Get Magento Media Url

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);


Get Magento Media Url

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);


Get Magento Skin Url

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);


Get Magento Store Url

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);


Get Magento Js Url

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);


Tags: magento tips , magento tutorial

 

Leave a Comment:


* Required Fields