Not sure how to do it with filter, but overriding the sfWebResponse sounds like a nice solution.
On Mon, Jul 6, 2009 at 6:53 PM, Frank Stelzer<[email protected]> wrote: > As i do not like filters, I would do it like this: > - Overwrite sfWebResponse::addStylesheet within an custom response class > - Define this response class in the factories > - configure the real assets name somewhere (maybe in the app.yml) > --- > public function addStylesheet($file, $position = '', $options = array()) > { > if($newFile = sfConfig::get('app_assets_'.$file)) > { > $file = $newFile; > } > return parent::addStylesheet($file, $position, $options); > } > --- > > Am 06.07.2009 um 08:46 schrieb Alexandru-Emil Lupu: > > There might be an ideea to setup a filter to do that. (i am thinking on a > post filter). Or another thing, would be to override the include_js() and > include_css() functions with something custom. > Those are 2 main ideas. > Alecs > > On Mon, Jul 6, 2009 at 1:24 AM, Sid Bachtiar <[email protected]> wrote: >> >> Hi all, >> >> Anyone got any idea if this can be made a plugin in Symfony? >> >> >> http://www.electrictoolbox.com/force-reload-css-javascript-unique-filenames/ >> >> Basically appends timestamp on the css and js files, for example >> main.css becomes main.20090606121212.css but this actually refers to >> main.css (using mod rewrite). >> >> So browser sees "main.20090606121212.css" but the file is actually >> "main.css". >> >> I guess in order to create such plugin, there must be a way to >> overwrite/intercept the templates css and js and change the file >> names? >> >> Kind regards, >> >> Sid >> -- >> Blue Horn Ltd - System Development >> http://bluehorn.co.nz >> >> > > > > -- > As programmers create bigger & better idiot proof programs, so the universe > creates bigger & better idiots! > I am on web: http://www.alecslupu.ro/ > I am on twitter: http://twitter.com/alecslupu > I am on linkedIn: http://www.linkedin.com/in/alecslupu > Tel: (+4)0748.543.798 > > > > > > > > > -- Blue Horn Ltd - System Development http://bluehorn.co.nz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
