質問

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