Skip to content
Advertisement

Tag: symfony

Using webpack on a common Symfony Bundle

I have a “common” bundle that is used on several Symfony projects. This bundle contains the assets we use on our different projects (js and css). Until now this bundle was mainly adding assets with macros that allowed to load the libraries cdn. We use macros to load only the scripts we want for each page. We manage the dependencies

how to keep double quotes in twig?

I have a json array that I pass to the twig template, but the double quotes in the array have been causing trouble, my json array is like this: in twig template, I print it out like this: I expect it to be attrs: [“a”, “b”], however, what gets output is attrs: ["a", "b"], I tried attrs: {{ arr|e(‘js’) }},

Ajax and Jquery in Symfony

I’m a beginner in Symfony (version 2), I have a project achieved with plain basic PHP, and now I’m redoing my pages in dealing with Symfony framework, and arrived to my jquery ajax functions, surely, things gonna be different, I used to do like this: Q: How to make that works on Symfony? What to put instead of targetFile.php? a

Advertisement