[pmwiki-users] variables for customization

Patrick R. Michaud pmichaud at pobox.com
Wed Jul 6 08:38:53 CDT 2005


On Wed, Jul 06, 2005 at 08:49:45AM +0200, Christophe David wrote:
> Thank you for your fast reply.
> 
> I have to admit I did not manage yet to understand how this works.
> 
> In a "local" directory, I have a file like group.page.php, containing this :
> 
> <?php
> Markup('test', 'fulltext', '/test:/',
> FmtPageName('$Group<br>$PageName<br>$FullName<br>', $pagename));
> ?>
> 
> which produces
> 
>          group
>          group.page
>          group.page
> 
> 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.

> Furthermore, I am trying to retrieve the page name, and naively tried to
> use $pagename directly.  It returned an empty string.  

No, there must be something else happening there -- by the
time a local/group.page.php file is loaded, PmWiki must have already set
$pagename to a non-empty page name, even if it's only the default page.
Otherwise it wouldn't have found the group.page.php file.
Are you sure $pagename was empty...?

Pm



More information about the pmwiki-users mailing list