[pmwiki-users] $FmtPV

Peter Bowers pbowers at pobox.com
Thu Feb 3 22:17:25 CST 2011


On Fri, Feb 4, 2011 at 1:04 AM, Thomas Lundgren <publik at lundgren.nu> wrote:
> On a page I call a cookbook-script-function with a markup like;
>
> (:my_function:)
>
> In the cookbook i have a function that checks the value in a form-field
> every time it is called and sets the result in a PageVariable.
>
> I want to use that variable on any page as any other PageVariable like;
>
> {$MyVariable}
>
> BUT. I can´t get this to work...
>
> I can use $FmtPV in config.php and in the cookbook-script and set the
> variabel $MyVariable. But I can´t change the variable content in the
> function that is called in the cookbook-script.

A couple easy things to check right off...

(1) Make sure you have $FmtPV declared as a global in your function
(2) Make sure your markup rule is ordered such that the changes you
are making occur before they are used (i.e., '<{$var}' or before, use
?action=ruleset with diag turned on to confirm the order)

-Peter



More information about the pmwiki-users mailing list