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
How to: Add Thumbnails in Manage Posts/Pages List (WP_List_Table)
doctor who google doodle how to play the game
How to play Doctor Who Google Doodle Game

Leave Your Comment

Your Comment*

Your Name*
Your Webpage

56 + = 63

Enjoy This Article?

Join My Mailing List...

Facebook

Twitter

THANK YOU