[Seaside] CSS URLs
Philippe Marschall
philippe.marschall at gmail.com
Wed Oct 4 10:07:13 UTC 2006
2006/10/4, Ron Teitelbaum <Ron at usmedrec.com>:
> Hello all,
>
> Thank you everyone that has worked on seaside. Seaside is really a
> wonderful environment! I'm still getting my feet wet.
>
> I have a question. I would like to generate tabs that look like the
> attached html file.
>
> To do this I would need to be able to support a URL in css. I've got this
> working "IF" I translate the url to a seaside url.
>
> I see the generateUrlForDocument but the image tag needs context to generate
> the url. I figured I would parse and replace the urls in
>
> WAPresenter>>updateRoot: anHtmlRoot
> self script ifNotNilDo: [:script | anHtmlRoot addScript: script].
> self style halt ifNotNilDo: [:style | anHtmlRoot addStyle: style].
>
> This makes sense to me since it appears that the css is added for each
> change in session and the images hold their seaside url throughout a
> session.
>
> I also figured this was possible since I have the context in WAPresenter.
> When I tried to create an image
>
> WARoundedTabStyle image: #bg on: (WARenderCanvas context: self context
> callbacks: #())
>
> (the image: imageName on: html method just does:
> ^html image
> fileName: imageName, '.gif';
> mimeType: 'image/gif';
> document: (self base64Decode: (self perform: imageName))
> )
>
> Creating a new canvas seems to have wiped things clean. Is there an easier
> way to generate and set the url of an image so that I can parse the CSS and
> replace url(some.gif) with the seaside url for that gif?
>
> Thanks for your help!
You more or less have two options:
- serve static files either with seaside or apache
- use file library
Philippe
More information about the Seaside
mailing list