[pmwiki-users] Problem with an pagelist template
Kaupert, Guido
Guido.Kaupert at brose.com
Mon Apr 6 05:11:43 CDT 2009
I want a simple events display. For this matter I added a pagetext variable "EventsDate". I don't want the date in the pagename, because I want to make it very simple to change the data of an event.
So an "event" looks like this:
(:EventsDate:2009-05-12:)
For the pagelist I tried something like this, but sadly it doesn't work. If there are two ore more events in one month, then the heading (in template first) ist repeated for every event. Why?
[[#EventsList]]
(:template first {(ftime %Y%m {{=$FullName}$:EventsDate})}:)
!! {(ftime "%m / %Y" {{=$FullName}$:EventsDate})}
(:template each:)
* [[{=$FullName}|{(ftime %d.%m.%Y {{=$FullName}$:EventsDate})} {=$Titlespaced}]]
[[#EventsListend]]
I also tried this in the events page:
(:EventsDate:2009-05-12:)
(:EventsGroup:{(ftime %Y%m {{=$FullName}$:EventsDate})}:)
and this for the template:
[[#EventsList]]
(:template first {{=$FullName}$:EventsGroup})}:)
!! {(ftime "%m / %Y" {{=$FullName}$:EventsDate})}
(:template each:)
* [[{=$FullName}|{(ftime %d.%m.%Y {{=$FullName}$:EventsDate})} {=$Titlespaced}]]
[[#EventsListend]]
and even this:
(:EventsDate:2009-05-12:)
(:EventsGroup:200905:)
The result is always the same:
03 / 2009
02.03.2009 Dies ist ein vergangener Termin
04 / 2009
10.04.2009 Termin für den April
04 / 2009
17.04.2009 Geburtstag
05 / 2009
10.05.2009 Dies ist ein zukünftiger Termin
Note that 04 / 2009 is twice in the list!
The pagelist ist always the same:
(:pagelist group=-Site* $:EventsDate=- fmt=#EventsList order=$:Events:)
Thanks,
Guido
More information about the pmwiki-users
mailing list