2

I want to get skin URL in Magento Controller. I tried this

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);

but it returns

http://magento_root/skin/

How can I get the URL like the one give below.

http://magento_root/skin/frontend/rwd/default

I need this because I want to set an image path in API response in controller.

1

I reckon you should try:

Mage::getSingleton('core/design_package')->getSkinBaseUrl();
|improve this answer|||||
  • Exactly what i want. Thanks @Raphael , It worked for me. – saiid May 17 '16 at 14:49
3
Mage::getDesign()->getSkinUrl('images/your-image.jpg');
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.