[pmwiki-users] Re: Re: variables for customization
Patrick R. Michaud
pmichaud at pobox.com
Wed Jul 6 19:54:22 CDT 2005
On Thu, Jul 07, 2005 at 01:36:15AM +0200, chr at home.se wrote:
> Just checking... PmWiki.BasicVariables is supposed to document pmwiki's
> PhP-variables, i.e. variables that are used by pmwiki.php.
Yes.
> This is in
> contrast to what I've referred to as "markup variables" that are available
> in markup using e.g. "{$group}".
Yes.
> Then we also have the variables that
> FmtPageName() recognizes.. hmm, it's getting kind of complicated now :-)
I tend to call these latter items "substitutions", or even
"variable substitutions" if you like. There are some substitutions
that are not variables, although almost every (non-array)
variable can be used as a substitution.
> Anyway, I'm surprised I hadn't noticed that $pagename is depreceated and
> that we should simply use $name in our scripts. And I also thought that
> $pagename was a normal variable, i.e. you do this
$pagename (the PHP variable) is not deprecated -- it still refers to the
current page, same as always.
$PageName (the FmtPageName substitution used in v1, note the
capitalization) is deprecated, and is now just $Name.
> PS. It'd be really convenient for writing scripts if '$name' and '$group'
> where available... I don't know how many times I've done this:
>
> $group = FmtPageName("$Group", $pagename);
I understand how everyone wants this to be conveniently available.
But it can also be wrong, and confusing from another aspect.
Consider the following url:
http://www.example.com/pmwiki/pmwiki.php
What value should $group and $name have when local/config.php is
called...? And should scripts/recipes rely on those values?
Pm
More information about the pmwiki-users
mailing list