[pmwiki-users] Re: Re: variables for customization

chr at home.se chr at home.se
Wed Jul 6 18:36:15 CDT 2005


On Wed, 6 Jul 2005, Patrick R. Michaud wrote:

> On Wed, Jul 06, 2005 at 08:24:49PM +0200, chr at home.se wrote:
> > On Wed, 6 Jul 2005, 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().  And $PageName was deprecated long ago in favor of 
> > > $Name.
> > 
> > Christophe, on which wiki pages did you find this outdated information?
> > Since I've fiddled with PmWiki.MarkupVariables recently, I could try and 
> > fix this (partly) related stuff as well.
> 
> The incorrect information is on 
> http://www.pmwiki.org/wiki/PmWiki/BasicVariables -- at least that's
> where I found it this morning when I searched.  It's hard to call it
> "outdated", since it was apparently added to the docs just last week.  :-)

Just checking... PmWiki.BasicVariables is supposed to document pmwiki's
PhP-variables, i.e. variables that are used by pmwiki.php. This is in
contrast to what I've referred to as "markup variables" that are available
in markup using e.g. "{$group}". Then we also have the variables that
FmtPageName() recognizes.. hmm, it's getting kind of complicated now :-)

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

	FmtPageName("Yada yada $Group", $pagename)

where $pagename is the name of the current page?

Some clarifications perhaps?

/Christian

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);

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list