문제

In my Magento site, we found there was configuration in admin.

Admin -> Store -> Configuration -> Advanced -> Developer (Enabled only on Developer mode). JavaScript settings -> Move JS code to the bottom of the page

When this is YES, all the scripts tags on the site moves to the bottom of the page.

But I need to include a script which shouldn't move to the bottom.

Is there any way to achieve this?

Thanks in advance.

도움이 되었습니까?

해결책

I have developed a solution on my own. And submitted this as a blog.

Hope this helps for someone.

https://www.dckap.com/blog/exclude-script-from-magento-2-3/

Happy Coding..!!!

Thanks.

다른 팁

Edit the JsFooterPlugin.php file in /vendor/magento/module-theme/Controller/Result and include an exception in the first conditional of public function beforeSendResponse

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top