Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

How To Add JS File in Frontend for All Pages in Magento 2

  1. #1

  2. #2
    Expert
    Join Date
    Apr 2017
    Location
    Ahmedabad, India
    Posts
    318
    Thanks
    3
    Thanked 3 Times in 2 Posts

    Default

    Assuming your script is located in <module_root>/view/frontend/web/script.js , the simplest way to add a script to all pages and all themes you can create a module containing <module_root>/view/frontend/layout/default.xml file.

  3. #3
    Junior Member kajal's Avatar
    Join Date
    Sep 2014
    Location
    Bangalore
    Posts
    1,446
    Thanks
    0
    Thanked 20 Times in 20 Posts

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •