Magento – Get Base Url, Get Skin Url, Get Media Url, Get Js Url



Get Base Url :

Mage::getBaseUrl();

Get Skin Url :

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);

Unsecure Skin File Url :

$this->getSkinUrl('images/imagename.jpg');

Secure Skin File Url :

$this->getSkinUrl('images/imagename.gif', array('_secure'=>true));

Get Media Url :

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);

Get Js Url :

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);

Get Store Url :

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);

Get Current Url

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


發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *