Daily Tips Magento Tutorials

How to get SkinURL in Magento 2

0
0 0

Question of the day:

How to use the old functions($this->getSkinUrl() and {{skin url=”}}) from Magento 1.x inside the brand new Magento 2?


Well the answer is pretty easy.

In Magento 1.x you can get the skin url(in phtml templates) using:
$this->getSkinUrl()

Now, in Magento 2 the function looks like:
$this->getViewFileUrl()

In Magento 1.x you can get the skin url(in cms blocks/pages/categories etc ) using:
{{skin url=”}}

Now, in Magento 2 the function looks like:
{{view url=”}}

If you need assistance or help with Magento Development please don’t hesitate to contact me via my contact form or comments section.
Happy Codding!

Stanley
I am a self made webmaster, blogger, web technology enthusiast and founder of StanleyTips.com.
You may also like
Best Magento Themes (2016) so far
How to turn off(or disable) Star Wars sounds from YouTube video player

Leave Your Comment

Your Comment*

Your Name*
Your Webpage

+ 27 = 31

Enjoy This Article?

Join My Mailing List...

Facebook

Twitter

THANK YOU