Re: How to call a separate css file within a flavor

"Will Guaraldi" <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
On 5/18/07, Jennifer Redman <[email protected]> wrote:
>
> Where do I put the reference to the location of the .css file for a
> particular flavor?  Does this go in the head file? And if so can someone
> give me a sample line  that calls a separate stylesheet?

Regarding media files (css, images, ...), PyBlosxom doesn't serve
these.  They're served by your web-server.  You can put these files
into a media directory that's served by your web-server and then use
the url for that media directory in your templates.

One way to do this is to add a property to your config.py file like this:

   py["media_url"] = "http://www.bluesock.org/~willg/media"

then you can use that variable in your templates.  For example, your
head template could have:

   <link rel="stylesheet" href="$media_url/style.css" type="text/css">

I think that answers your question, but it's possible I misunderstood the issue.


> Also is there an overview or how-to somewhere describing how to write a new
> flavor (if not maybe I'll write one during this attempt to help out with the
> docs)?  Also I'm a little confused about the difference between a flavor and
> a template...

A template is a single file that contains the markup for a part of a
page.  A flavour is a group of templates that make up a complete page.
 So for example the html flavour has several templates that belong to
it: "head.html", "story.html", "foot.html", ...

There's some better write-up and examples here:

   http://pyblosxom.sourceforge.net/1.3.1/manual/c224.html

Hope that helps!

/will

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.