[pmwiki-users] Conditional Directive based on time

Miller, Joshua web at cityofelmira.net
Tue Oct 11 20:51:32 CDT 2005


-----Original Message-----
From: Patrick R. Michaud [mailto:pmichaud at pobox.com] 
Sent: Tuesday, October 11, 2005 9:29 PM
To: Miller, Joshua
Cc: 'pmwiki-users at pmichaud.com'
Subject: Re: [pmwiki-users] Conditional Directive based on time


On Tue, Oct 11, 2005 at 08:00:16PM -0400, Miller, Joshua wrote:
>    Hello all,
> 
>    I'm trying to set up a conditional directive for an event listing.  The
>    general idea is that after an event takes place, it "disappears" from
the
>    page...
> 
>    The code would be something like this:
> 
>    (:if before12062005:)
>    Event that occurs on December 6, 2005
>    (:ifend:)
> 
>    This way, the event would only display until December 6, 2005 and then
>    would "roll" off the webpage.
> 
>    Can anyone help me out or get me started?

Actually, event listings based on dates were one of the reasons why 
I added conditional markup in the first place.  :-)

How about conditionals like this instead ...?

    (:if date 20051206-20051210 :)   display during Dec 6-9, 2005
    (:if date -20051206 :)   display before Dec 6, 2005
    (:if date 20051206- :)   display on or after Dec 6, 2005
    (:if date 20051206 :)    display only on Dec 6, 2005
    (:if ! date 20051206 :)   display *except* on Dec 6, 2005 
    (:if date 200512 :)      display during Dec 2005

Pm
-------------------------------------

Thanks a lot Patrick.  That is a GREAT feature!

-Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20051011/65f45ede/attachment.html 


More information about the pmwiki-users mailing list