[pmwiki-users] {(...)} markup recipe available
Tegan Dowling
tmdowling at gmail.com
Fri Apr 13 11:35:50 CDT 2007
On 4/13/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Fri, Apr 13, 2007 at 10:59:51AM -0500, Tegan Dowling wrote:
> > The pagelist is also working. This is great!
> >
> > Now, in a GroupHeader, I'd like to have
> > ! (:if pagename-format is text:){$Titlespaced}(:else:){(ftime ''
> > {$Name})}(:ifend:)
>
> How about something like...?
>
> (:if name 200[0-9]*){(ftime '' {$Name})}(:else:){$Titlespaced}(:if:)
>
> Any page with a name starting with "2000" through "2009" will be
> treated as something to be passed to {(ftime)}.
That'll work! Or, actually, is this syntax right: (:if name 20[00-99]*)?
>
> Or, if we want to get more fancy, we could build a 'hasdate'
> conditional:
>
> (:if hasdate {$Name}):) ...
Would be great, if there's a call for it. Would that come in handy if
someone were going to try doing conditionals based on *what* the date
is - e.g. "is the date of the name greater than today?" etc.?
More information about the pmwiki-users
mailing list