[pmwiki-users] Using variable in skin template

Sandy sandy at onebit.ca
Fri Oct 23 14:17:13 CDT 2009

DaveG wrote:
> To use a PHP variable within a skin template you need to store it as a 
> FmtPV variable, which needs to be a executable PHP statement (thus the 
> odd quotes). Refer to PmWiki/PageVariables:
> $FmtPV['$MyVar'] = '"abc"';
> And then to use it in the .tmpl file:
>    My quote of the day is {$MyVar}

Could you also do:

in config.php
$FmtPV['$color1'] = '"#00cc00"';

then in the .tmpl file:
h1 {color:$color1;}
A {color:$color1;}

then when the client changes his mind, I only have to change it once.



More information about the pmwiki-users mailing list