[pmwiki-users] variables for customization
Christophe David
pmwiki at christophedavid.org
Wed Jul 6 01:49:45 CDT 2005
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" .
Furthermore, I am trying to retrieve the page name, and naively tried to
use $pagename directly. It returned an empty string. When using
FmtPageName($fmt, $pagename), it works.
But what kind of magic is it ? At the place in the code where $pagename
is empty, you pass it to FmtPageName() and it suddently holds useful
information so that the FmtPageName() can return what the (empty)
parameter was supposed to hold...
I clearly missed something ;-)
Any help would be appreciated.
Christophe
----
$Group
The name of the group that the current page being shown/edit/otherwise
acted upon is in.
Examples: 'PmWiki', 'Cookbook'.
See also $FullName and $PageName.
$PageName
The name of the current page being shown/edited/otherwise acted upon.
Examples: 'SideBar', 'HomePage'.
See also $FullName and $Group.
$FullName
The group and page name, separated by a dot, of the current page being
shown/edit/otherwise acted upon.
Examples: 'PmWiki.SuccessStories', 'Cookbook.Skins'.
See also $Group and $PageName.
FmtPageName($fmt, $pagename)
Returns $fmt, with $variable and $[internationalisation] substitutions
performed, under the assumption that the current page is pagename.
---
More information about the pmwiki-users
mailing list