[pmwiki-users] PVs in PTVs not resolved by PageTextVar()

Peter Bowers pbowers at pobox.com
Wed Jul 28 09:56:02 CDT 2010


On Wed, Jul 28, 2010 at 3:25 PM, Maxim <maxim at smspower.org> wrote:
>>> I can't pass the string through FmtPageName because that doesn't
>>> handle this sort of string.
>>
>> Why not?
>
> It substitutes things like "$Name", not "{$Name}" or
> "{Group.Page$Name}", so I end up with something like
> "{Group.PagePage}.jpg". Parsing out the {...} seems like hard work.

I confirm this FmtPagename() operation.  Seems like a bug to me, but
maybe I'm missing something...

This code:

$foo = FmtPagename('{Test.PV$Name}', 'Test.PV');
echo "foo=$foo<br>\n";
$bar = FmtPagename('{$Name}.xyz', 'Test.PV');
echo "bar=$bar<br>\n";

results in this output:

foo={Test.PVPV}.xyz
bar=PV.xyz

This doesn't seem consistent to me.  Should I make a PITS entry or is
there some reason why this needs to stay this way?

-Peter



More information about the pmwiki-users mailing list