[pmwiki-users] Page Variables help - how to take one and split into two

stevecrisp at gmail.com stevecrisp at gmail.com
Mon Nov 2 15:04:29 CST 2009

2009/11/1 Hans <design5 at softflow.co.uk>
> yes, do  for latitude and longituide as you did for coord.
> Use {$Latitude} and {$Longitude} in pages.
> These are defined as page variables, not page text variables.

I'm using the following code but think I have an issue with the order
in which variables are being resolved.  Here's what I have:

Markup('coord', 'directives',
  "PZZ(SetCoord(\$pagename, PSS('$1'), PSS('$2')))");

function SetCoord($pagename, $lat, $long) {
    global $FmtPV, $SaveProperties;
    $FmtPV['$Latitude'] = '$lat';
    $FmtPV['$Latitude'] = '$long';
    $SaveProperties[] = 'latitude';
    $SaveProperties[] = 'longitude';
    SetProperty($pagename, 'latitude', &lat, ', ');
    SetProperty($pagename, 'longitude', $long, ', ');

It appears that the $FmtPV and $SaveProperties arrays are not being
set (as seen from ?action=diag).  I can confirm the above SetCoord
function is being called and have printed out the variables to check
$pagename, $lat and $long are correct.  The {$Latitude} and
{$Longitude} page variable do not print from within the Wiki page.

Am I going mad or missing something?

More information about the pmwiki-users mailing list