[pmwiki-users] page variables to php variables translation

viki.veeks at gmail.com viki.veeks at gmail.com
Tue Dec 14 08:36:08 CST 2010


In my skin, I want to point pmwiki to different template files on the 
basis of groups and pages. With copy and paste, I found:

$pagename = ResolvePageName($pagename);
$group = PageVar($pagename, '$Group');
$name = PageVar($pagename, '$Name');

if ($group == "Main")
LoadPageTemplate($pagename, "$SkinDir/front_page.tmpl");

It works -- thanks pmwiki :-)

maybe I want to understand better...

I'm looking at the note from:
"Note: Do not confuse these variables (set and used only in PmWiki 
pages) with PHP variables."

Correct me if I'm wrong:
Page variables may be used directly in template files.
Page variables may not be used directly in the PHP files found in:

Am I right in saying that -before they are used in those PHP files- page 
variables must be translated via PageVar?

Where can I find documentation on the PageVar function?


More information about the pmwiki-users mailing list