Quantcast
Channel: Webkul Blog
Viewing all articles
Browse latest Browse all 5489

Add External Css And JS in Magento2

$
0
0

Here we will see how to add external css and js file in magento2.

Add External Css In Magento2

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="http://externalcss/external.css" src_type="url"/>
    </head>
</page>

Add External Js In Magento2

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <script src="http://externaljs/external.js" src_type="url"/>
    </head>
</page>

Viewing all articles
Browse latest Browse all 5489

Trending Articles