Philippe Marschall wrote:
2007/2/17, Brad Fuller <brad(a)sonaural.com>om>:
Looking through the various Pier documentation, I
see that code has
changed and thus there are several different explanations of how to
change stylesheets. I want to use a different css stylesheets but I
can't find out where to change it/them. Isn't there one place to
point Pier to one stylesheet?
BTW: for some reason, I have no style sheet at all for Pier. I don't
know what I did, but I didn't edit any code... I must have loaded a
new version of some package. Anyway, unless it stomped on something
else, ifI can learn where to change the stylesheet pointer, It'd
give me a start.
Thanks to Christoph Wysseier Pier now supports easy custom styles with
FileLibraries. All you need to do is provide your own FileLibrary that
implements #styleCss which returns a string that is the main CSS file.
You can put all your CSS there, or in other selectors (as PierLibrary
does) or in other locations by importing the CSS files you need.
For example if #styleCss makes
@import url(basic.css);
this means #basicCss is imported. Basic FileLibrary stuff. FileLibrary
one of the classes that actually have a comment that describes what it
does.
In the configuration of your pier application under 'Pier' you can
select it in 'File Library'.
Thanks, and in my Pier, it's set to PRPierLibrary.
I'm still a bit lost about File Library, though. Let's use css as an
example. My stylesheets were found only if I redirected, in apache,
where seaside retrieved the files:
RewriteCond /path/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$
http://localhost:9999/seaside/pier/$1 [P,L]
If I remove the RewriteCond, stylesheet files are not found, (even
though I also placed the same files in a sub dir of the image named
seaside/files/PRPierLibrary.)
(the access logs say apache is looking in /seaside/files/PRPierLibrary)
If I go to seaside/config and select configure for "files" I get the
listing of File Libraries, as expected. Selecting PRPierLibary lists
files that are all the css files that (I thought) are pointed to. Fine,
that seems to work. But, when I uploaded a file (just to see where the
file would go) and check the complete server, the file is no where to be
found. However, the file is retrievable from the configuration screen. I
can only assume that the image swallowed it up.
This is confusing. There is a class called PRPierLibrary. PRPierLibrary
is also a directory name - evident because apache is looking for that
directory. Also, if you go to PRPierLibrary in the configuration, the
"files" are not really files. The contents of the files are actually in
the methods of PRPierLibrary.
So, I'm still lost on exactly where seaside is retrieving files.
--
brad fuller
http://www.Sonaural.com/
+1 (408) 799-6124