Cool... :)
On Dec 3, 1:45 am, Fabrice B <[EMAIL PROTECTED]> wrote:
> I myself used something very similar to what you see here
>
> >http://particletree.com/notebook/automatically-version-your-css-and-j...
>
> but overriding javascript_include_tag from the AssetHelper file,
> inspired by François Baligant (synalabs.com)
>
> function javascript_include_tag()
> {
> // MODIF FABRICE
> $version = (sfConfig::get('app_asset_version_js') ?
> '.v'.sfConfig::get('app_asset_version_js') : '');
> $html = '';
> foreach (func_get_args() as $source)
> {
> $source = javascript_path($source);
> if (substr($source,-3,3)=='.js' && substr($source,0,3)=='/js')
> {
> $source .= $version;
> }
> $html .= content_tag('script', '', array('type' => 'text/
> javascript', 'src' => $source))."\n";
> }
>
> return $html;
>
> }
>
> And the same for stylesheets_include_tag. To override the AssetHelper
> file, it is very easy, thanks to symfony :-) Just copy the AssetHelper
> file from the symfony/lib folder to your own lib folder. And change
> the new file. symfony cc will automatically make this second file
> priority and therefore you will have "overridden" the former
> functions.
>
> You still need
> 1. to configure the version of your files in the app.yml
> 2. configure your .htaccess or your lighttpd configuration to rewrite
> \.js(\.v.+) files into .js and the same for \.css(\.v.+)
>
> Fabrice
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---