[pmwiki-users] Event-calendar with pagelist and ftime? (repost)

Audun Myhra Bergwitz bergwitz at gmail.com
Mon Nov 12 08:45:16 CST 2007


Hans wrote:

> Once you dig into this you can see that the pagelist markup is 
> probably already powerful enough to deliver what you are asking.

Thanks for answering. I've already realized that that the pagelist
markup is powerful enough to deliver what I'm asking and read the pages
you refer to. But some of the details where lost on me, so I need some
help to understand it. Any help would be appreciated.

> (:pagelist if="date {(ftime %GW%V {*$Name})} {=$Name}" :)
> 
> returns all of the pages where the name is in the same week as that 
> of the current page."

I'm not sure if I get how this code work? Is this correct:

{(ftime %GW%V {*$Name})} seem to define a range of values, ie every date 
value within the same week as {*$Name)? It then
compares this to the name of pages beeing searched and if {=$Name} is
within the range if=date returns TRUE?

Why does one need %GW%V? Isn't %GW enough?

Would this work for a pagelist where $Time(page text variable) is within 
the current week:
(: pagelist if="date {(ftime %GW%V when=today)} {=$Time}" :) ?

What format should $Time have for the above to work? Would the order of
this pagelist be chronological based on $Time? Or do I need to create a
custom order= for it to do that?

Also:
 From http://www.pmwiki.org/wiki/PmWiki/PageTextVariables

> Note ConditionalMarkup does not work with page text variables or 
> include other pages.
> 
> Page text variables don't honor (:if:). This is the same way that 
> doing (:include OtherPage#section:) doesn't look to see if 
> [[#section]] is inside of an (:if:)...(:ifend:) construct of some 
> sort.

Does this mean that the above pagelist won't work or does it only mean
that page text variables within conditional markup wont work?

audun of humla.info





More information about the pmwiki-users mailing list