[pmwiki-users] PTVs and Conditional Markup
Sameer Kumar
skumar at eharch.com
Thu May 15 14:10:35 CDT 2008
Thursday, May 15, 2008, 5:00:15 PM, Sameer Kumar wrote:
> (:if {*$:featured}=-?* :)
you need to be more precise with your conditional.
You cannot use abc=xyz as conditional, use instead
(:if equal abc xyz:)
and you cannot use wildcards ?*
What exactly are you trying to test?
It may be possible with use of markup expressions to construct a
conditional test, or define a custom conditional.
I have a little form that shows on the bottom of every page if the user
is an administrator. This form, built using Fox, allows the
administrators to insert a ptv called 'featured' which has a date-time
stamp.
I want to control the visibility of this form based on whether the page
already has the ptv defined or not. It is as simple as:
If ptv is not set -
Show form
Else-
Show "The ptv was set on 'xxxx'.
Ifend
I use the ptv to eventually build a list of pages that are exceptional.
Similar to the "Featured Articles" in Wikipedia. I also display the
latest "Featured Article" on the Home Page to draw people's attention to
these pages.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080515/61cedee9/attachment.html
More information about the pmwiki-users
mailing list