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.

2 Answers 2

1

I reckon you should try:

Mage::getSingleton('core/design_package')->getSkinBaseUrl();
1
  • Exactly what i want. Thanks @Raphael , It worked for me. Commented May 17, 2016 at 14:49
3
Mage::getDesign()->getSkinUrl('images/your-image.jpg');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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