Magento Resource | E-Commerce Generation Explorer

TAG | url

As we know, Magento comes with built in function for retrieving URL paths. Function is called getBaseUrl() and its located under Mage class.

But this function is not documented as it should be. Documentation only states that function retrieves $type parametar which is by default equal to “base”.

Here is the list of all the available parameters which they had, and they all come from Mage_Core_Model_Store.
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
http://magesite.extension/js/
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
http://magesite.extension/index.php/
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
http://magesite.extension/media/
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
http://magesite.extension/skin/
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
http://magesite.extension/
(more…)

· ·

Theme Design by devolux.nh2.me