[pmwiki-users] repost: problem with PTV and if= date in pagelists

Peter Bowers pbowers at pobox.com
Thu Jan 29 04:10:21 CST 2009


> Thanks for your help, but I'm no further. I tried all of the above
> suggestions, but all I get is a full list of all pages on our wiki.

Check your output one more time...  I'm guessing that rather than *all*
pages on your wiki you are getting a list of all pages THAT DO NOT HAVE THE
PTV SET *combined with* the pages that have the PTV set to a date on or
after today.  Because there are so many pages without the PTV set at all it
would look like you have all pages being returned.  In other words, I think
you will find that the pages with the PTV set to a date earlier than today
are *not* being listed there...  (Of course, I'm guessing, but it's worth a
shot...)

> Surprisingly
> (:pagelist if="! date {(ftime %Y%m%d)}.. {=$:Timestamp}" :)
> seems to work as it should. It gives a list of all pages with the PTV
> set, but with either a date before the current date or some other value.
>   But I can't get a list of pages with a date later than the current date?
> That's weird!! Is this a bug maybe?

If my assumption above is correct then what it means is that

	if="date {(ftime %Y%m%d)}.. {=$:Timestamp}"

calculates as "true" whenever $:Timestamp is today or after AND whenever
$:Timestamp is not set at all.  Thus when you negate it then the condition
becomes FALSE in those conditions and TRUE only for those with the PTV set
to a date before today's date.

Just a guess, but worth looking into, I think.

-Peter




More information about the pmwiki-users mailing list