[pmwiki-users] Conditional Extensions

Dominique Faure dominique.faure.1 at free.fr
Thu Sep 15 17:05:15 CDT 2005


At Thursday, September 15, 2005 11:53 PM [GMT+1=CET], Martin Fick wrote:

> On Thu, Sep 15, 2005 at 11:44:08PM +0200, Dominique Faure wrote:
>>> Also any thoughts on ways to nest conditions?
>>>
>>
>> You should have a try on the Cookbook/ConditionalExtensions recipe which
>> implements complex boolean expressions.
>>
>> if A then
>>  if B then
>>    something
>>  else
>>    something else
>>  endif
>> endif
>> is equivalent to:
>>
>> if A and B then
>>  something
>> elseif A and not B then
>>  something else
>> endif
>>
>
> Yes, I have looked at (and I am using) that recipe.  I did
> not know that it could do that, what is the pmwiki syntax
> for such an expression (there is no mention of such a
> capability in the recipe)?
>
>

[From PmWiki/ConditionalMarkup]
...
Any (:if:) automatically terminates the previous one, thus markup can be 
easily cased:

    (:if auth read:)* You can read
    (:if auth edit:)* You can edit
    (:if auth upload:)* You can upload
    (:ifend:)

So, you just have to "mix" it with Cookbook/ConditionalExtensions.

Dom 





More information about the pmwiki-users mailing list