SHARE
TWEET

Untitled

a guest Dec 13th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. To Retrieve URL path in STATIC BLOCK
  2.  
  3. To get SKIN URL
  4. {{skin url=’images/sampleimage.jpg ‘}}
  5.  
  6. To get Media URL
  7. {{media url=’/sampleimage.jpg’}}
  8.  
  9. To get Store URL
  10. {{store url=’mypage.html’}}
  11.  
  12. To get Base URL
  13. {{base url=’yourstore/mypage.html’}}
  14.  
  15. To Retrieve URL path in PHTML
  16. Note: In editing PHTML don’t forget to enclode the following code with PHP tag
  17.  
  18. Not secure Skin URL
  19. <?php echo $this->getSkinUrl(‘images/sampleimage.jpg’) ?>
  20.  
  21. Secure Skin URL
  22. <?php echo $this->getSkinUrl(‘images/ sampleimage.gif’, array(‘_secure’=>true)) ?>
  23.  
  24. Get  Current URL
  25. $current_url = Mage::helper(‘core/url’)->getCurrentUrl();
  26.  
  27. Get Home URL
  28. $home_url = Mage::helper(‘core/url’)->getHomeUrl();
  29.  
  30. Get Magento Media URL
  31. Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
  32. Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
  33.  
  34. Get Magento Skin URL
  35. Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
  36.  
  37. Get Magento Store URL
  38. Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
  39.  
  40. Get Magento Js URL
  41. Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top