[pmwiki-users] variables for customization

Patrick R. Michaud pmichaud at pobox.com
Wed Jul 6 16:01:10 CDT 2005


On Wed, Jul 06, 2005 at 10:32:24PM +0200, Joachim Durchholz wrote:
> Patrick R. Michaud wrote:
> >On Wed, Jul 06, 2005 at 08:49:45AM +0200, Christophe David wrote:
> >
> >>According to the documentation (snippets below), I would expect
> >>"page" as $PageName, and not "group.page" .
> >
> >The documentation is wrong there; none of $Group, $PageName, and 
> >$FullName are variables in the normal sense.  They're only available 
> >through FmtPageName().
> 
> Actually the docs are right - I think Christophe took the information 
> from http://www.pmwiki.org/wiki/PmWiki.BasicVariables , which documents 
> the variables available to module writers.

No.  None of $Group, $PageName, or $FullName are PHP variables --
they only exist as available substitutions within FmtPageName.  
In particular, a script author cannot do something like:

    if ($Group == "PmWiki") {
      # configuration stuff specific to PmWiki group
    }

However these substitutions end up being documented, it needs to be 
made very clear that they are *not* variables in the same sense as 
the rest of the (true) variables in the PmWiki.Variables documentation.

> The variables available to page writers are documented on
> http://www.pmwiki.org/wiki/PmWiki/MarkupMasterIndex , right in the first 
> section.

Please, these latter items aren't "variables", they're markup.  
Some of them happen to correspond to variables available in PHP
scripts, but they aren't themselves variables, and a markup author
cannot do anything to "vary" them.

Pm



More information about the pmwiki-users mailing list