[Seaside] Re: WAComponent to PDF

Otto Behrens otto at finworks.biz
Tue Oct 27 19:25:38 UTC 2015


Yes, we serve a static file (with nginx). You should be able to create
a static URL to your seaside css as well, so I don't see why you'd
have a problem. You cannot specify a relative URL in your HTML output
as this will then probably be interpreted as relative to the file you
wrote on disk. Unless you write the css out to a file in that relative
path.

We use the full url eg. "root stylesheet url:
'http://myHost/resources/style.css'", where this is the site's css
path. Alternatively, try just a relative path like "root stylesheet
url: 'style.css'" and write the css file next to the html one. I don't
know why seaside would make the url absolute when you write it out.

We took all our CSS out of Seaside and put it on disk. We use less and
what not to "compile" it and get the web server to produce it. Mainly
because 1. Seaside is too heavyweight to serve (dynamically created)
CSS up as well as the HTML and 2. The tools are a but scrappy to deal
with CSS properly (but would be nice if we had a Seaside-like library
that helps with CSS).

On Tue, Oct 27, 2015 at 7:43 PM, Hilaire <hilaire at drgeo.eu> wrote:
> Le 22/10/2015 18:38, Otto Behrens a écrit :
>>  (WAHtmlCanvas builder fullDocument: true)
>> rootBlock: [ :root |
>> root context visitor: (WARenderingGuide client: root context visitor).
>> root title: 'Form'.
>> root meta contentType: (WAMimeType textHtml charset: 'utf-8').
>> root stylesheet url: self stylesheetFileFullPath.
>> self addAdditionalBookmarksForRowsToRootIfNecessary: root ];
>> yourself
>>
>>
>> HTH
>> Let me know if you need more.
>
> Hi Otto,
>
> As the generated html file is read locally I get issue with the css path.
>
> It renders the path to the style file as /files/MyFileLibrary/style.css
> but it should look like http://myHost/pathToCss/style.css when you want
> to read the html file locally.
>
> The absolute path to style.css is purely constructed by Seaside, adding
> the host part does not make a valid url:
> http://myHost/files/MyFileLibrary/style.css is not valid.
>
> How did you manage it? Are you serving your static files with Apache? I
> am not there yet and would like to find a pure Seaside solution. Is
> there a way to have a valid url, to a resource, with the http part in?
> So far I did not find it, but Seaside is so big.
>
> Thanks
>
> Hilaire
>
>
> --
> Dr. Geo
> http://drgeo.eu
> http://google.com/+DrgeoEu
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list