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

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Thu Apr 19 07:24:06 CDT 2007


On Thu, 19 Apr 2007, Patrick R. Michaud wrote:

>> This seems useful... here's a modified version (untested though) that I
>> assume goes into <group>.GroupHeader.
>>
>> 	(:if expr ! equal "{*$:toc}" "no" :)(:*toc:)(:ifend:)
>>
>> Using this, all pages that do _not_ contain the following line
>>
>> 	(:toc: no:)
>>
>> will get a table of contents. Very neat, and you don't have to use the
>> description variable.
>
> This is indeed neat.  Couldn't the capability also be built into the 
> (:*toc:) directive itself, so that it doesn't display itself on any page 
> where $:toc is "no"?

I guess it could... I CC:d John. To be honest, I don't remember what 
(:*toc:) does compared to (:toc:).

Hmm.. maybe a flag should be given to (:toc:) in order for it to check for 
(:toc: no:) before it's used to supress the toc?

/C

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr


More information about the pmwiki-users mailing list