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

V.Krishn mistyfire at autograf.pl
Mon Jul 18 19:36:07 CDT 2005


On Tuesday 19 July 2005 05:12, John Rankin wrote:
> On Tuesday, 19 July 2005 11:27 AM, V.Krishn <mistyfire at autograf.pl> wrote:
> >The rename recipe is really handy, specially when you are at different
> > comp and do not have ftp password. Otherwise I think it is a missing
> > feature from core PmWiki.
> >Rename recipe I guess is actually copying the old content to the destined
> > new page and modifying the content to correct the referenced/relative
> > variables/links, which makes the recipe complex making it suitable for a
> > cookbook recipe.
> >
> >With my understanding I think the mechanism for processing (:include:)
> > with reference to any $pagename already exists. One only needs to add a
> > "fork" mechanism and after processing merge the two.
>
> That's right -- the (:includeg Group.PageName:) just puts a step between
> reading the page and processing it, to qualify unqualified links. It
> relies on PmWiki to do the heavy lifting of processing include options.
> Having done that, it's a simple matter to add an extra small step to
> translate {$Group} before passing the result to PmWiki for processing
> as normal.
>
> The only reason it's part of the rename script is that it takes
> advantage of rename's abilty to group-qualify unqualified links.
aha, then that makes sense, I was thinking fmtPageName() already returns the 
corect values when (:include SomeGroup.SomePage:) is processed referencing 
"SomeGroup.SomePage" as $pagename and extracting and substituting the values. 
>
> So as I understand it, you are quite correct that it's a simple
> matter to add 'translate {$Group} references' to
> (:include Group.PageName:) processing. One just needs to decide
> what directive syntax to use.
Well then I guess its true. :-)

V.Krishn




More information about the pmwiki-users mailing list