[pmwiki-users] Calendar / Event list
Patrick R. Michaud
pmichaud at pobox.com
Fri Mar 31 12:40:45 CST 2006
On Fri, Mar 31, 2006 at 07:29:58PM +0100, Hans wrote:
>
> 1. using (:if date {$Today}..:) in pagelist:
>
> !!!pagelist fmt=#futuredates
> [[#futuredates]]
> (:if date {$Today}..:)*[[{=$FullName}|+]](:if:)
> [[#futuredatesend]]
>
> {$Today} is page variable for today's date in form yyyy-mm-dd
>
> Can anyone shed any light on why the date conditional does not work
> inside pagelist? {(pagelist group=EventGroup fmt=#futuredates :)
> returns a list of all pages, disregarding the condition.
> Replacing {$Today} with 20060331 does have the same result.
(:if date {$Today}..:) will always return "true", because "today"
is always included in the date range "today through the end of time".
> 2.
> Using conditonal extensions I had a little bit more success:
>
> !!!pagelist fmt=#futuredates2
>
> [[#futuredates2]]
> (:if ge {=$EventDate} {$Today2}:)*[[{=$FullName}|+]](:if:)
> [[#futuredates2end]]
>
> {$Today2} is a pagevariable returning today's date in format yyyymmdd,
> and {$EventDate} returns the pagename in format yyyymmdd.
>
> (:pagelist group=EventGroup fmt=#futuredates2 :) resulted in a list of
> event pages from today. But adding count=1 to get the next event did
> not have anything returned, nor did any other count=number.
> Why does count not work in these circumstances?
> Is count= restricted to certain conditions and can't be used in all
> cases?
The count= option is working fine -- the markup
(:pagelist group=EventGroup count=1 fmt=#futuredates2 :)
gets only the first page from EventGroup and passes it to #futuredates2
for formatting. If that one page doesn't meet the (:if:) criteria,
it's not displayed.
Put another way: count= identifies the number of pages to be
sent to the formatting routine; the (:if:) markups in the
formatting routine don't have any effect on the count.
Pm
More information about the pmwiki-users
mailing list