I have a page text variable that spans more than one line:

     [=
     (:MyPTV:This is a 
     two line page text variable:)
     =]

Is there a way to test whether or not MyPTV is empty?

This doesn't work, because the newline breaks the markup:

     (:if !equal "{{$FullName}$:MyPTV}" "":)

I tried writing a custom markup expression to give me the length of MyPTV, but 
the function didn't work:

     # a custom markup expression that returns the length of the page text 
variable, for example: {(ptvlen "{$FullName}" "$:MyPTV")} 
     $MarkupExpr['ptvlen'] = 'PTVlen($args[0],$args[1])';
     function PTVlen ($page, $ptv) {
         $var=PageTextVar($page,'$:ptv');
         return strlen($var);   
     }

Randy
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to