[pmwiki-users] help with (:if and :) statement

Patrick R. Michaud pmichaud at pobox.com
Wed Apr 18 21:22:44 CDT 2007


On Thu, Apr 19, 2007 at 12:16:44PM +1000, Garth.J.McMillan at transport.qld.gov.au wrote:
> I'm trying to use the following statement:
> (:if !equal {$FullName} "Main.HomePage" && {$Description} "notoc" 
> :)(:*toc:)(:if:)
> 
> However, only the Homepage doesn't display the (:*toc:), pages with a 
> description of notoc, still display it.
> 
> Both parts work correctly individually, so there is obviously something 
> wrong with my "and" usage. I've tried many combinations of brackets etc. 
> but can't seem to get it working.

Complex expressions require 'expr' at the beginning, and each operator
(including !) needs spaces around it.  Also, I'm guessing that you're
wanting to do this on pages other than Main.HomePage and that don't
have "notoc" as the description.  If that's the case:

  (:if expr ! equal {$FullName} "Main.HomePage" && ! equal {$Description} "notoc" :)

Shorter:

  (:if expr ! name "Main.HomePage" && ! equal {$Description} "notoc" :)

Pm



More information about the pmwiki-users mailing list