[pmwiki-users] Random PTVs set with {(randk)} do not retain set values

Randy Brown randy at brownragfilms.com
Tue Dec 16 16:20:50 CST 2014


You can use a page variable to do this. For example, in a configuration file:

$RandomNum = mt_rand(1,100);
$FmtPV['$RandomNum'] = "'$RandomNum'";

Then in markup use:

{$RandomNum}

Or if you must use a PTV, use:

MyPTV: {$RandomNum}

Randy


>       {$:Random_string}
> 
> ... I am trying to find a way to "freeze" PTV random values
> once they are set, in order to use them in pages and formulas.




More information about the pmwiki-users mailing list