sidebar calendar plugin

William Morgan wmorgan-hobix-is-the-way at masanjin.net
Wed Sep 29 09:10:17 EDT 2004


Excerpts from why the lucky stiff's mail of 28 Sep 2004 (EDT):
> Well, the calendar shouldn't need to regenerate everytime there's an
> update.  Because creation times don't really change.  If they do, then
> it's probably best to regenerate the whole site, because archive pages
> would have to change as well.

The calendar might not need to regenerate, but the sidebar as a whole
does.

Let me try and restate the issue. I'd like a different calendar for each
month; right now I'm accomplishing that by generating an entire sidebar
file for each month. But some sidebar sections (like the section map)
need to be updated every time a page is added (in this case, because the
number of posts per section may change, or a new section may have been
added, etc.). This means that to play it safe, every update must
regenerate all the sidebar files, because I don't know whether any of
the other sidebar components have changed or not.

> So, if you're storing the calendar in an SSI, make sure that SSI's 
> `Page.updated' timestamp is set to the latest creation date among posts 
> in that month.  There's a storage.last_created method as well, which 
> takes an array of [entry_id, creation_time] (which you'll get back from 
> storage.all or storage.find or storage.inpath and so on.)

Right, and if I split out just the calendar component itself into a
separate file for SSI, that'd work for that file---but the sidebar files
themselves, of which I'd still need one per month, would still need to
be regenerated every time, for the above reason.

I think this may not have been such a big issue until I went and made
100 different sidebar files. :)

> I'll play with this calendar further and help come up with some ideas.
> I think the ideal route for this plugin would be JavaScript + divs of
> all months in a single SSI.  Provide an archive link (or bag the
> arrows) for people without JS.

Interesting... getting back to one sidebar file would certainly solve
all these issues.

-- 
William <wmorgan-hobix-is-the-way at masanjin.net>


More information about the Hobix-is-the-way mailing list