This page describes the "variables" that are associated with pages. Page variables have the form {$variable}, and can be used in page markup or in certain formatting strings in PmWiki. For example, the markup "{$Group}" renders in this page as "PmWiki".
Note: Do not confuse these variables (set and used only in PmWiki pages) with PHP variables. Page variables can be read in PHP with the PageVar() function.
Note that these variables do not necessarily exist in the PHP code, because they have to be determined for a specific page. (However, they are usable in FmtPageName strings.)
There is also the form {pagename$variable}, which returns the value of the variable for another page. For example, "{MarkupMasterIndex$Title}" displays as "Markup Master Index".
Special references
Special referenced variables are used to specify the context of the variable when:
the variable is included into a destination (target) page
the variable is used in a sidebar, header, or footer
Prefixing the variable name with an asterisk (*) means the variable's value is related to the target page or main (body) page.
{*$PageVariablename} - prefixed by an asterisk (*) - value reflects target page context
Without the asterisk the variable's value is that in the page from which it originates, eg source page of include, sidebar, or header or footer.
{$PageVariablename} - retains value in source page context
For example you can test to see if the page is part of another page
(:if ! name {$FullName}:)
%comment% name of this page is not the same as the page this text was
sourced from
->[[{$FullName}#anchor | more ...]]
(:ifend:)
or refer to the main page in a sidebar, footer, or header
The form {pagename$variable} or some PageLists, can display the values for other pages, regardless of the password protections.
If the other pages are protected and the visitor has no read permissions, PageVariables, unlike PageTextVariables, normally display the values. While most variables do not contain sensitive information, some of them could do: $Title, $Description and those starting with $LastModified.
Administrators and module developers can redefine the sensitive page variables to respect authentications, by using the "$authpage" variable instead of "$page" in the definition. The following snippet can be added in local/config.php -- it will rewrite the default possibly sensitive definitions to the secure ones.
Defines new Page Variable of name $CurrentSkin, which can be used in the page with {$CurrentSkin} (also for Conditional markup). It's necessary to use the single quotes nested inside double-quotes as shown above (preferred) or a double-quoted string nested inside single-quotes like '"this"'.
If you want to have a Page Variable that returns the currently used password (more precisely, the last password entered), you can use