Skip to Content
Sep 27, 2017 at 10:28 PM

How to add a javascript file to a page for addon for a storefront?


I'm working with Hybris 6.3 and made a addon to customize a storefront, adding some new pages for it.

I have been following the guide from this link but I haven't found how to set javascript files for certain pages.

When I created the addon it came with a js file on the path acceleratoraddon/web/webroot/_ui/responsive/common/js/customstorefront.js, from what I gather this js is being used on every page I have been adding to the adding, is that right? Can someone confirm this to me?

In case that is true, but also because I want to sort my code in different js files for best practices, how can I configure the js files I add to limit their use to some pages only?