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

V.Krishn mistyfire at autograf.pl
Mon Jul 18 05:59:59 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
Here at http://insteps.net/notebook2/channel.php/Test/IncludeApproaches I have 
tried to sketch my understading of the current approach of "include" 
directive in PmWiki alongwith a suggestion.
I hope I have understood how (:include:) works.
Your suggestions would be great.

Regards.
V.Krishn




More information about the pmwiki-users mailing list