Magento version:2.0.0

How to get the theme url in the phtml file? there has a global function for it?


If you're looking for a replacement of $this->getSkinUrl() from Magento 1 then the equivalent in Magento 2 is the following:

| improve this answer | |

What do you mean by theme url? What aspect of the theme? E.g skin, template, base URL etc.

If you want the skin URL then Raphael's answer is correct, if you want the template URL it is:


To get the base url:

| 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.