[Seaside] Static resources location
C. David Shaffer
cdshaffer at acm.org
Fri Oct 29 18:10:17 CEST 2004
Pablo Iaria wrote:
>Hi all,
>
>I have a div with the following style:
>
>#menu {
> font-family: Arial;
> background-image: url("background.png");
>}
>
>The image never gets displayed.
>
>
>Where should I put the file background.png?
>
>
You have three options (maybe more...I'm sure someone will suggest some
else):
1) have Seaside read the serve the image, in the case of static
resources a bad idea
2) have Kom serve the image, a little better than the previous but
makes your server sluggish for large images
3) have another web server around serving your static images
I use 3 since I've always got Apache running somewhere:
background-image: url("' self class staticImageBase , '/background.png");
where self class staticImageBase answers an absolute URL like
'http://www.cdshaffer.com/someapp/images'
If you choose to go with 2, just to avoid having a second server then
you can hunt around for help on how to configure Kom to serve Seaside
and a ModFile using the "ModuleAssembly" class as your plug. I have the
code around somewhere if you need it.
David
--
C. David Shaffer
http://www.cs.westminster.edu/~shaffer
http://www.shaffer-consulting.com
More information about the Seaside
mailing list