[pmwiki-users] [Fwd: problem with fomatpagename]
Patrick R. Michaud
pmichaud at pobox.com
Tue Sep 4 13:15:29 CDT 2007
On Sun, Sep 02, 2007 at 08:12:16AM +0200, Knut Alboldt wrote:
> found the reason why fmtpagename returns nothing (but not the solution):
>
> before the update I could use FmtPageName directly in config.php. Now
> all FmtPageName-Values returned are blank cause $pagename, $PageUrl etc
> are blank.
> Has something changed concerning that ?
You may need to "resolve" $pagename prior to calling FmtPageName
(i.e., so that it becomes a complete pagename instead of any
partial pagename provided by the browser):
$pagename = ResolvePageName($pagename);
If that doesn't solve the problem, let me know.
You might also want to update the format string:
$ButtonCopyPage = FmtPageName('<td><a id="copy"
href="{$ScriptUrl}?n=Site.$[CopyPage]?group={$Group}?template={$FullName}"
title="$[copy contents of this page into a new one]">$[Copy
Page]</a></td>',$pagename);
In particular, I've changed "$pagename" in your old template to
be "{$FullName}" in the the new one (as $pagename might not be
a valid substitution).
Pm
More information about the pmwiki-users
mailing list