views:

689

answers:

3

I found this: http://www.symfony-zone.com/wordpress/2008/12/13/use-routing-to-server-localized-and-dynamic-javascript/

But I saw that it has already been built into Symfony with the use_dynamic_javascript() AssetHelper.

I can't find any documentation for using this helper though. Any examples, links, or anything to help? Thanks.

A: 

The only way to get PHP parsed in javascript files is to change the file extension of the js file to php, to have the PHP parsed, and the JS parsed by the web browser.

Shamil
Unfortunately it's not that simple with Symfony. It's a matter of using one of the methods discussed in the question -- there's just no documentation for the use_dynamic_javascript() method, which is what I am trying to figure out.
James Skidmore
A: 

I ended up using this method.

James Skidmore
A: 

Maybe this can help: howto use use_dynamic_javascript helper

Cristian N