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

Martin Fick fick at fgm.com
Thu Jul 14 17:57:17 CDT 2005


> > > 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.
> > 
> >   I guess in many cases that's true.  I have cases where a
> > Group.Template was used to create the initial text and
> > users are not expected to have to replace {$Name} with the
> > actual value, but it would be nice to be able to have it
> > set for the included page.
> 
> Just for clarification -- the Group.Template is being
> used to create a page that is then being (:included:)
> by another page...?  Hmmmmmmm, I think I begin to understand now.
> I'll have to think on it a bit more.

  Bingo. :)

> How many times do {$Group} and/or {$Name} appear in the template?

  Only once, actually it's not that big of a deal.  It
seems like it is 'good practice' thought to keep it {$Name}
if that's what you expect it to be, not to replace it with
the actual name of the page.  This allows for people to see
your intent.  It also allows the text to be copied and
pasted easily into other similar doucments.  I guess I
think like a programmer, maybe other authors would not do
this.

  Afterall what is the purpose of {$Name}?  Is it meant to
be a shortcut in the current page or is meant to be used
only as a way to change something when including from
another page?  If it is the latter, then I would have to
support the argument that another set of substitution
variables is needed such as {$RealName} and{$RealGroup}.  I
don't like that, but it seems justifed then.

  

  -Martin




More information about the pmwiki-users mailing list