[Seaside] Re: [Seaside-dev] Seaside 3.0 API for accessing external stylesheet and javascript files?

Conrad Taylor conradwt at gmail.com
Thu Dec 24 11:31:33 UTC 2009

Lukas, it seems that WAFileLibrary serves the static content from the image.
 I'm really looking to serve all my static content (i.e. images,
stylesheets, and javascripts files) from Apache or another web server.  I
understand the Apache side of the configuration after reading sections
22.3.5 and 22.3.6 of the "Dynamic Web Development with Seaside".  Also, the
WAFileLibrary seems like a great deal of work to an external resource.  In
short, I was thinking that I could simply do the following:

stylesheets =
#( "/stylesheets/main.css" "/stylesheets/a.css" "/stylesheets/main.css" ).
stylesheets do: [ :each |  html link with: [  self type: "text/css" href:
 "/stylesheets/main.css" media: "screen" charset: "utf-8". ].
= #( "/stylesheets/main.css" "/stylesheets/a.css" "/stylesheets/main.css" ).
stylesheets do: [ :each |  html script with: [  self type:  "text/html"
source:  "/stylesheets/main.css"  charset: "utf-8". ].

or something even easier

html link with: [  self all from: "/stylesheets" cache: true. ]. 'This will
make all the stylesheets in /stylsheets available to the application.'

Now, I would like to insert the javascript files at the end of the page like
this so that they are the last thing loaded when the page is rendered.

html script with: [  self all from: "/javascripts"  cache: true. ]. 'This
will make all the javascript files in /javascripts available to the

Also, I come from a Rails background where 'cache => true' will generate a
file which contains all the javascripts and a file that contains all
the stylesheets respectively.  Other options can include "recursive:" and


On Thu, Dec 24, 2009 at 12:55 AM, Lukas Renggli <renggli at gmail.com> wrote:

> Have a look at JQGoogleLibrary, it includes the jQuery libraries
> through Google. Compare it with JQDeploymentLibrary, it includes them
> locally. You can find that pattern for other Javascript code too.
> Also the class comment of WAFileLibrary is quite detailed. Feel free
> to ask a follow-up question if any of the above is not clear.
> Lukas
> PS: I answered that mail on seaside at lists.squeakfoundation.org,
> because this is not really a Seaside-Development question.
> 2009/12/24 Conrad Taylor <conradwt at gmail.com>:
> > Hi, I was wondering, where can one find the complete Seaside 3.0 API for
> > referencing external stylesheets and javascript files?  Also, I would
> like
> > to reference these files from other domains like google.com as well as
> the
> > local disk.
> > Thanks in advance,
> > -Conrad
> >
> >
> >
> >
> > _______________________________________________
> > seaside-dev mailing list
> > seaside-dev at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> >
> >
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20091224/53645a90/attachment-0001.htm

More information about the seaside mailing list