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
display magento products on homepage
How to: Display all Magento products on homepage
How To Add a Simple jQuery Script to WordPress Parent or Child Theme?

Leave Your Comment

Your Comment*

Your Name*
Your Webpage

6 + 2 =

Enjoy This Article?

Join My Mailing List...

Facebook

Twitter

THANK YOU