[pmwiki-users] Conditional markup - page action as condition, nesting of IF markup

Curtis, Clayton Clayton.Curtis at va.gov
Thu May 25 10:44:54 CDT 2006

I'm running into an issue where an edit form (in wikiforms) is including
a footer with content and links that make no sense (and are risky) in
the editing context. I looked for a way to access the current page
action, and conditional markup with {$Action} looked like it should
work.  I tried:


= = = = =

(:if ( match ^Contributions.[0-9]{5}$ ) and ( ! equal {$Action}
editeform ) :)



[[{$FullName}?action=upload | Click here]] to upload a file to attach to
this page.

(:if attachments:)


Current attachments:




= = = = =


The goal was to have the code active if this was a page of the form
Contributions.nnnnn and the action was not editeform.

(The previous version, without the $Action clause, worked fine to
activate the code only if on Contributions.nnnnn, but showed up on the
form edit.)

This didn't work, and I'm hoping someone has insights on two things:


a. $Action didn't seem to have a value (I wound up displaying it in the
form page), despite the URL being


b. As far as I can tell, the documentation is silent on how multiline
and nested IF statements work, as well as the role of (:ifend:) vs
closing (:if...:) with (:if:).  Did I miss something other than the
documentation page on Conditional Markup?  So, my inference on what is
allowed may well be flawed.  Anyway, looks like

    (:if <condition> :)



works, but it also looks like if one nests IF statements that the
interior IF terminates the enclosing IF so that something like 

    (:if equal A B:)

    A = B

    (:if equal A A:)

    This shouldn't display, but does.



doesn't do what one might expect.  Likewise, in

    (:if A A:)

    outer IF true \\

    (:if A B:)

    inner IF false and shouldn't display \\


    rest of outer IF \\


the inner IF text shows up, which I wouldn't think it should. Clearly I
am misinterpreting how IF works....


If someone will clarify the expected behavior, I'll be happy to try to
update the documentation or add links to whatever other pages may exist.



Clayton Curtis MD PhD 
VHA-IHS Interagency Liaison & Enterprise Architecture 
 VAMC (00) 
 150 South Huntington Avenue 
 Boston, MA 02130 
 voice: 857-364-4786  cel: 617-794-7151 
 fax: 781-687-3470    email: clayton.curtis at med.va.gov
<mailto:clayton.curtis at med.va.gov>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060525/c365b986/attachment.html 

More information about the pmwiki-users mailing list