Re: [pmwiki-users] if exists conditional markup problem

2015-04-01 Thread John Rankin
It may be possible to intercept the if code and find out what condition 
pmwiki is evaluating, which should give information about what is 
happening. Try this in local/config.php:


$CondTextReplacement = MyTempRepl(\$pagename, \$m[0], \$m[1]);
function MyTempRepl($pagename, $text, $code='') {
  echo $text;
  return CondText2($pagename, $text, $code);
}

If I am reading stdmarkup.php correctly, this should echo the contents 
of the if code at the time the conditional is evaluated, which will show 
whether the var has been evaluated as intended.


JR

On 2/04/15 12:07 AM, Criss Ittermann wrote:

I'm trying to figure out why this is returning false (To be announced.):

(:if exists Profile-Data.{Members/Hosts$:{(ftime %Y%m)}} :)
...
(:else:)
To be announced.
(:ifend:)


When the following returns a fully functioning link to the correct 
page, which exists:


[[Profile-Data.{Members/Hosts$:{(ftime %Y%m)}}]]


What am I doing wrong?

Crisses




___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


--
John Rankin
Affinity Limited
T +64 4 495 3737
M +64 21 726 546

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] if exists conditional markup problem

2015-04-01 Thread Dominique Faure
Hi,

This comes simply because the space between ftime and %Y%m is seen
as a separator when evaluation the condition.
You should try enclosing your expression with quotes:

(:if exists ’Profile-Data.{Members/Hosts$:{(ftime %Y%m)}}’ :)

-D-


On Wed, Apr 1, 2015 at 1:07 PM, Criss Ittermann cris...@kinhost.org wrote:
 I'm trying to figure out why this is returning false (To be announced.):

 (:if exists Profile-Data.{Members/Hosts$:{(ftime %Y%m)}} :)
 ...
 (:else:)
 To be announced.
 (:ifend:)


 When the following returns a fully functioning link to the correct page,
 which exists:

 [[Profile-Data.{Members/Hosts$:{(ftime %Y%m)}}]]


 What am I doing wrong?

 Crisses



 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users




-- 
Dominique

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users