The most efficient way (cpu cycle wise) is to bypass Tapestry all together and let httpd share the images. This approach however lacks the ability to version assets using the T5 facilities.
The best way IMHO is to use relative paths in css (if there are "images" and "css" folders, then the images are referenced like ../images/image.png), this way the versioning is preserved and it just works. This method obviously has some limitations also. (Works only when your image and css are in the domain.) The images are exposed to web via two urls: versioned and non versioned. Hardcode one of those to the css is also an option. Use firebug or similar to get the url. If you use versioned url, you may have to change the url in css when upgrading the 3rd party lib. You don't have to (atleast in 5.1) expose the image as an asset to reference it in css or html. - Ville Chuck Kring wrote: > > Of course. But what is most efficient way to return a Tapestry Asset > specified in the css file. The css file is not a template. > > On 8/4/2010 4:23 AM, Steve Eynon wrote: >> You're probably better off just overriding the css to return the image >> you >> want. >> >> Steve. >> --- >> Sent on the move from my X10 Mini, so excuse the small words and spelling >> mistakes! >> >> On 4 Aug 2010 07:33, "Chuck Kring"<cjkr...@pacbell.net> wrote: >> >> Hi everybody, >> >> I'm trying to override the gif image used for tabs in the Chenillekit >> tabset. This is specified in >> the chenillekit TabSet.css like this: >> >> a.ck.tab { >> background:url("white-top-bottom.gif")repeat-x scroll 0 -1px >> transparent; >> ..... >> } >> >> At this point I assume that the css file is not rendered, so I can't >> directly specify the gif as an asset. Aside from returning the asset as >> a >> StreamResponse from an onActivate() event is there a better way to serve >> a >> gif file into a css-specified background? >> >> Thanks, >> >> Chuck >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://old.nabble.com/Asset-in-css-file--tp29343059p29347500.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org