[pmwiki-users] Capture all pages within date range.

Ben Wilson dausha at gmail.com
Tue May 22 12:59:47 CDT 2007


On 5/22/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, May 22, 2007 at 01:07:26PM -0400, Ben Wilson wrote:
> > On 5/22/07, Ben Wilson <dausha at gmail.com> wrote:
> > > Does anybody have a suggestion on how to capture a pagelist items
> > > within a date range? For example, I want to list all journal pages
> > > occurring this week (by page name "Journal-2007-05-21").
> >
> > I should clarify that I'm looking for a dynamic answer, so I can say
> > something like:
> >
> > (:pagelist occurring=2007W21:)
> I can see about adding the ISO week notation if you like.

I am using the ISO week, so that would be helpful.

> We can also add a "thisweek" shortcut for the above, so that
> it becomes
>
>     (:pagelist if="date thisweek {=$Name}" :)

However, I want to have a page (Summary-2007W21) list all journal
entries for that week. Each week, there will be a new summary page. In
six months, a visitor should be able to visit Summary-2007W21 and see
the same pages as they would this week.

I've thought of using pagelist mapping to (:Week:2007W21:).[1]
However, that necessitates that the page author embed the PTV, which
may be asking a bit much. Maybe I can ROSPattern the template so the
value is stored when the page is saved.

Hmm. I may have to put together a recipe that breaks the pagename into
the prefix/date (Summary-2007W21 into array(Summary, 2007W21)) then
feeds the date into a pagelist. Then, it becomes a question of
creating each week's summary page on Mondays, which is easily enough
done.

[1]:  (:pagelist $:Week=2007W21:)


-- 
Ben Wilson
"Words are the only thing which will last forever" Churchill



More information about the pmwiki-users mailing list