Skip to content

r:include_javascript

joshrcook edited this page Oct 1, 2014 · 1 revision

<r:include_javascript />

Javascripts should be stored in the javascripts directory. To include a file called main.js, use this syntax:

<r:include_javascript name="main" />

Be sure not to include the .js extension when adding file names.

You can also include multiple scripts by seperating them with commas. For example, if you wanted to add three files named file-1.min.js, file-2.min.js, and file-3.js, add them like so:

<r:include_javascript name="file-1.min, file-2.min, file-3" />