[pmwiki-users] Marup processing and EnableRelativePageVars
Patrick R. Michaud
pmichaud at pobox.com
Wed Sep 12 10:18:43 CDT 2007
On Wed, Sep 12, 2007 at 10:30:23AM -0400, DaveG wrote:
>
> I have two questions.
>
> 1] I've defined a markup, which includes a variable replacement.
> However, what I see when the code is rendered is $FullName rather
> than the value of $FullName. What am I missing here?
> Markup('skidoo_tab_edit', 'directives',
> '/\\(:skidoo_tab_edit:\\)/',
> '<div class="divedit">[[{$FullName}?action=edit
> | ]]{$FullName}</div>'
> );
Page variable replacements happen very early in the markup
processing -- by the time directives are processed, PmWiki
has already done the page variable substitutions.
It might work to restart processing using PRR(), as in:
Markup('skidoo_tab_edit', 'directives',
'/\\(:skidoo_tab_edit:\\)/e',
"PRR('<div class="divedit">[[{$FullName}?action=edit | ]]{$FullName}</div>')"
);
> 2] I'm using the new "$EnableRelativePageVars = 1;" in my config to
> get absolute variable references.
Actually, $EnableRelativePageVars = 1 gives "relative page references"
-- i.e., {$FullName} is relative to the page in which it is written,
instead of the page on which it is displayed.
> In this case though I only need absolute references on a specific
> page, not site wide. Is there a way to apply this setting to a
> specific page, or usage instance?
You probably want to set things up to work with $EnableRelativePageVars
sitewide, as that will be the PmWiki default in 2.2.0.
Pm
More information about the pmwiki-users
mailing list