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.
1 Answer
in magento 1
$this->getSkinUrl()
Replace with in magento2
$block->getViewFileUrl()
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– OZZIEJul 26, 2016 at 13:06
-
@OZZIE every block file
extends
fromMagento\Framework\View\Element\Template
thatextends
withMagento\Framework\View\Element\AbstractBlock.php
. you can on line762
you can this methodgetViewFileUrl
Jul 26, 2016 at 13:39