I would like to insert an applet, but Im not sure how to insert the deployJava javascript source "<script src="//www.java.com/js/deployJava.js"></script>" into the <head> section. Any advice would be appreciated.
Archive
If you only want it on one page you can add a line like this to the top of the twig file for that page
- {% block javascripts %} {% do assets.addJs('theme:///js/slick.min.js') %} {% endblock %} -
If you want to add it to every page its a similar change but to your base.html.twig file - add a new line I've done below
TWIG
{% block javascripts %}
{% do assets.addJs('jquery', 101) %}
{% do assets.addJs('java.com/js/deployJava.js', 100) %}
{% do assets.addJs('theme://js/modernizr.custom.71422.js', 100) %}
{% endblock %}
{{ assets.js() }}
---
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1362 | 9 years ago | ||
| 2 | 940 | 9 years ago | ||
| 2 | 4069 | 9 years ago | ||
| 1 | 2960 | 9 years ago | ||
| 3 | 1124 | 9 years ago |