I have the following code based on Symfony2 docs:
{% block javascripts %}
{% javascripts filter="?jsqueeze" output="js/app.js"
"%kernel.root_dir%/Resources/assets/js/one.js"
"%kernel.root_dir%/Resources/assets/js/two.js" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
which works like a charm.
What i want to do instead
<script src="{{ asset_url }}"></script>
use something like:
<script> ... inline asset contents here ... </script>
I tried asset docs and also dug the AsseticTokenParser and AsseticNode classes, but could not find a variable that refers to the actual file path instead of url.
I usually do this with css, not js, but this should be the same concept.
thanks!
source
share