[pmwiki-users] Fwd: Custom markup accessing page variables in an included page

Maxim maxim at smspower.org
Fri Oct 23 15:21:23 CDT 2009

I have some custom markup. It is an evaluated function; in its markup,
it wants to access the value of $Name for the page it is on. It does
this like so:

global pagename;
$filename = PageVar($pagename, '$Name') . $desc . '.png';

This works fine but as soon as this custom markup is transcluded in
another page, the value of $Name reflects that page, not the original.
I don't really want to have {$Name} specified in the markup (which I
think would allow (:include basepage= :) to work). Within the context
of the markup function, is it possible for it to know the original (base)
page name?


More information about the pmwiki-users mailing list