Can you define the hellish resource in the configuration file (yml / xml)?
Let's take a jquery example. I would like to have this configuration:
# app/config/config.yml assetic: resources: jquery: latest: "app/Resources/js/jquery-1.6.2.js" 1_6_2: "app/Resources/js/jquery-1.6.2.js" 1_5: "app/Resources/js/jquery-1.5.js"
And to be able to access this resource from any template in my application, follow these steps:
{% javascripts 'jquery.latest' %} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %}
What is the right way to do this?
One more thing. How to associate a path with the / Resources / js / jquery -1.6.2.js application in a branch template?
{% javascripts 'app/Resources/js/jquery-1.6.2.js' %} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %}
This does not work. Can you do it at all? What resources can I put in the application / Resources and how can I access them in my templates? Where is it documented?
Now symfony 2 really lacks the documentation ...
source share