I have a Symfony2 app, which needs to work on different topics These topics include essentially CSS files (Ultimately other files and mine in a single)
In the Falcon, I could dynamically set the assets of my property in the controller. In Symfony, property is clearly defined, my current solution is as follows, but it does not look very good. This is my HTML of base.html.twig
. My entity has a property subject
and I define the subject object in my controller.
Actually I am looking for the proper way to do this in Symphony. Otherwise, I would love it like that.
& lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" /> & Lt; Title & gt; Welcome {% block title%}! {% Endblock%} & lt; / Title & gt; & Lt; Link rel = "icon" type = "image / x-icon" href = "{{asset ('favicon.ico')}}" /> {% if theme is defined} {% theme.css%} For asset in & lt; Link rel = "stylesheet" href = "{{asset.url}}" /> {% Endfor%} {% endif%} & lt; / Head & gt; & Lt; Body & gt; Welcome to the {% block page%} default page! {% Endblock%} {% Subject Javascript%} {% Subject is defined} {% property.js%} for asset in