Monday, 15 March 2010

php - How to use short assets path in Twig Template for Symfony2? -


I found how the property file has been referenced here on the Tweg Template:

It says I should include this as a bundle folder in path like this example: {{asset ('bundles / mybundle / css / main.css')}}

This solution Not reliable for me because I have many website templates with extensive property file references (JS, CSS, images) which convert me to stroll template Mitigation is required and was referred to the example I like to me this asset paths need to completely change. At least this can be easier if I can use it like this: {{asset ('css / main.css')}}

Can I help with the problem? Thanks for everyone.

You can include all the CSS in a folder like this:

  {% stylesheets 'bundles / main / js / lightbox / css / *' filter = 'cssrewrite'%} & lt; Link href = "{{asset_url}}" rel = "stylesheet" type = "text / css" / & gt; {% Stylesheets%}    

No comments:

Post a Comment