1. Get Base Url magento:
Mage::getBaseUrl();
2. Get Magento Skin Url magento:
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
3. Get Media Url magento:
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
4. Get Js Url magento:
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
5. Get Store Url magento:
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
6. Get Current Url magento:
Mage::helper('core/url')->getCurrentUrl();
7. Get Home Url magento :
Mage::helper('core/url')->getHomeUrl();
B. Các hàm Get Url magento trong CMS Pages hoặc Static Block:
1. Get Base Url magento :
{{store url=""}}
2. Get Skin Url magento:
{{skin url='images/imagename.jpg'}}
3. Get Media Url magento :
{{media url='/imagename.jpg'}}
4. Get Store Url magento :
{{store url='mypage.html'}}
No comments:
Post a Comment
Hãy thoải mái khi gửi nhận xét và câu hỏi cho Quốc Duy. Chân thành cảm ơn