[pmwiki-users] Re: Am I stupid? PageVar function
Karl Loncarek
dh2mll at web.de
Tue Jan 3 08:43:50 CST 2006
"Patrick R. Michaud" <pmichaud at pobox.com> wrote in
news:20060103142538.GA18019 at host.pmichaud.com:
> On Tue, Jan 03, 2006 at 01:53:35PM +0000, Karl Loncarek wrote:
>> Hi,
>> I'm using the way commenting as described in Cookbook/CommentPageLink
>>
[...]
>
> There's no longer a '{$fmt}' markup (it's all handled by PageVar in
> the {$var} markup), so the above needs to read:
>
> Markup('{$BaseName}', '<{$var}',
> '/{\\$BaseName}/',
> preg_replace('/-/', '.', PageVar($pagename,'$Name'), 1));
>
> Or, $BaseName can be added as a page variable with
>
> $FmtPV['$BaseName'] = 'str_replace("-", ".", $name)';
>
> in which case no Markup() call is needed, and {$BaseName} will
> work anywhere the other page variables work.
>
> Pm
>
I agree, the latter one is the best solution...
--
Bye
Karl (aka Klonk)
More information about the pmwiki-users
mailing list