[pmwiki-users] Switching (:include:) context

Patrick R. Michaud pmichaud at pobox.com
Thu Jul 14 17:02:49 CDT 2005


On Wed, Jul 13, 2005 at 10:14:04AM -0400, Martin Fick wrote:
> Feature request.  Would it be possible to add a switch to
> the (:include :) directive so that if desired the context
> could be switched during the inculde so that variables such
> as {$Name} and {$Group} take on the values for the 
> included page.  

Unfortunately, this isn't quite so simple as it might seem at
first.  (:include:) does a straight text substitution into
the current page; after processing the (:include:) PmWiki has
no idea where the include starts/stops.

Also, such a switch would need to handle more than just {$Name}
and {$Group} -- page references within the (:include:) should
probably be made relative to the included page.

Conversations in the past around this issue have also generally
assumed that {$Name} and {$Group} would continue to refer to
the including page, which is opposite from what you're proposing,
so there's some potential for confusion there.  In general the
principle is that an included page already knows its own group and
name, so it doesn't need {$Group} or {$Name} for that.

Pm




More information about the pmwiki-users mailing list