JS
Get the URL to a javascript file in your theme.
Example
{{ theme:js src="scripts" }}
/site/themes/redwood/js/scripts.js
If you leave off the src
parameter, the tag will use the theme name as the filename.
{{ theme:js }}
/site/themes/redwood/js/redwood.js
Add the tag
parameter to output a script
tag.
{{ theme:js src="scripts" tag="true" }}
<script src="/site/themes/redwood/js/scripts.js"></script>
Parameters
src
string |
The path to the Javascript file, relative to the js directory. You can leave off the extension, we know it's a .js file. |
---|---|
version
boolean false |
If you are using Elixir to manage your theme assets, setting this to |
cache_bust
boolean false |
Setting this to |
absolute
boolean false |
Render the URL in an absolute format. |