[pmwiki-users] quirk with nested-if

adam overton a at plus1plus1plus.org
Mon Jun 30 23:26:43 CDT 2008

Hi guys
thanks for the suggestions.
unfortunately none of them are solving my problem yet --

- adding >directives or >>directives in the markup for nestedif just  
makes the problem worse - the entire nestedif chain fails to load,  
and just prints all of it as text on the screen, whereas in my  
situation, it's just the inner blocks (starting at 'if1') that aren't  
loading and are being spit out...

- adding the 'include' markup and loading it with a '>nestedif' leads  
to a similar result

- i tested with the default pmwiki skin and the issue remains

- and then on my own: including nested-if's from page to page isn't a  
problem at all -- this totally works:
       . Main.TestInclude --> add the nestedif code with multiple  
       . Main.TestInclude2 --> (:include Main.TestInclude:)
       . Main.TestInclude3 --> (:include Main.TestInclude2:)
... results in the correct execution of the provided nested-if code

so i really think it's the way $GroupFooterFmt is being implemented  
that may be causing the weirdness:
$GroupFooterFmt = '(:include {$SiteGroup}.SiteFooter basepage={* 
$FullName}:)(:nl:)' . $GroupFooterFmt;

i wonder if anyone's been able to replicate (or disprove) this yet?


. . .

(:if0 true:)
(:ifA true:)
(:if1 true:)
if0,ifA,if1 true
if0,ifA true if1 false
(:if2 true:)
if0,if2 true, ifA false
if0 true, if2,ifA false
if0 false

results in:

(:if1 true:)
if0,ifA,if1 true
if0,ifA true if1 false

On 30 Jun 2008, at 3:40 AM, Hans wrote:

> Monday, June 30, 2008, 10:44:39 AM, Peter & Melodye Bowers wrote:
>> Perhaps if you change the 2nd argument of the nested-if to  
>> something later
> like '>>directives' or something like that it might work?
> if using nested if markup try in config.php
> Markup('include', '>nestedif',
>  '/\\(:include\\s+(\\S.*?):\\)/ei',
>  "PRR(IncludeText(\$pagename, PSS('$1')))");
>   ~Hans

More information about the pmwiki-users mailing list