Magento version:2.0.0

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

2 Answers 2


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


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:


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.