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
change-logo-of-a-pligg-website-cms-stanleytips.com
How to change logo of a Pligg website version 2.0.0 RC2 (2013)
Top 10 jQuery Gallery Plugins ready to be used in projects

Leave Your Comment

Your Comment*

Your Name*
Your Webpage

+ 35 = 38

Enjoy This Article?

Join My Mailing List...

Facebook

Twitter

THANK YOU