Please note that the forum isn't realy used anymore.

If you have questions, want support or just simply want to talk to us you can find us on slack.

 

Add specific javascript to a page.

Hi, Can a JavaScript file be added to a specific page? As an example the shopping part of the side would have shopping.js, and this file should not be loaded in other pages.

If you have a shopping module you can always use $this->header->addJS('shopping.js', null, false); but if you only have some pages with editor text I think you should probably create a new template "shopping" that contains that javascript file at the bottom.

Thank you. It is a good idea and costs nothing.

Comment

The forum is deprecated in favor of our Slack channel, which provides real-time support for your issues.

Join us on Slack here: https://fork-cms.herokuapp.com/