[pmwiki-users] repost: problem with PTV and if= date in pagelists
Patrick R. Michaud
pmichaud at pobox.com
Tue Jan 27 12:22:10 CST 2009
On Tue, Jan 27, 2009 at 12:56:39PM -0500, DaveG wrote:
> On Tue, 27 Jan 2009 15:44:11 +0100, "none <" <bergwitz at gmail.com> wrote:
> > I made this pagelist:
> >
> > (:pagelist if="date {$:Time}":)
> >
> > where Time is a PageTextVariable. As I understand the documentation on
> > Pagelists this should give me all pages where Time is set at date later
> > than today (as long as Time has a recognizable format). Instead I get a
> > pagelist of all pages on the wiki. Why doesn't it work? Any tips on how
> > to make it work?
Note that {$:Time} always refers to the Time page text variable
on the page in which it is written. So in the above, {$:Time} gets
substituted before the (:pagelist:) is ever processed.
In particular, it does ''not'' mean the Time PTV on each page in the
list.
Also, if you want to have "$:Time later than today", you really
want to put a .. in place. Otherwise it checks for date equality.
> > I also tried (:PageList if="date {(ftime fmt=%Y%m%d when={$:Time})}":)
> > which gives no results.
Same issue applies here -- the {$:Time} substitution takes place
before the (:pagelist:) markup is entered.
You might try:
(:pagelist if='date ..{=$:Time}':)
I have no idea if that actually works, but it's what it probably
ought to be.
Pm
More information about the pmwiki-users
mailing list