[pmwiki-users] Using variable in skin template

DaveG pmwiki at solidgone.com
Fri Oct 23 17:56:25 CDT 2009



Sven Hartenstein wrote:
> Hi David,
> 
>> Or, you could grab the PTV into a variable, and then use it from the tmpl:
>>   $FmtPV['$myvar'] = PageVar($pagename,'$:myvar')
> 
> This gives me:
> 
> Parse error: syntax error, unexpected T_STRING in
> /<path>/pmwiki.php(762) : eval()'d code on line 1
That's because the PageVar needed to be quoted, as Hans showed. Thus,
    $FmtPV['$myvar'] = 'PageVar($pagename,\'$:myvar\')'





More information about the pmwiki-users mailing list