What is replacement function for getting the skinurl in magento-2. In magento-1 we use $this->getSkinUrl() and {{skin url=''}} to get skin url.


in magento 1


Replace with in magento2


in magento 1

{{skin url=''}}

Replace with in magento2

{{view url=''}}


  • Does not explain how to fetch it from inside a template used by any block type – OZZIE Jul 26 '16 at 13:06
  • @OZZIE every block file extends from Magento\Framework\View\Element\Template that extends with Magento\Framework\View\Element\AbstractBlock.php. you can on line 762 you can this method getViewFileUrl – Qaisar Satti Jul 26 '16 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.