[pmwiki-users] About {$:var} text-variables

Patrick R. Michaud pmichaud at pobox.com
Fri Sep 8 13:02:25 CDT 2006


On Fri, Sep 08, 2006 at 06:52:23PM +0100, Américo Albuquerque wrote:
> On Fri, 8 Sep 2006 10:40:22 -0500, Patrick R. Michaud wrote:
> > On Fri, Sep 08, 2006 at 04:18:49PM +0100, Américo Albuquerque wrote:
> > > On Fri, 8 Sep 2006 08:15:46 -0500, Patrick R. Michaud wrote:
> > > > We're looking at a more natural way of setting variables than
> > > > the recipes' (:set var=...:) markups.
> > > >
> > > Ok but you'll still need some way to say that you 
> > > want them to be set as variables or every text that 
> > > is written in the same way will also be set
> > > as variable
> >
> > Not at all. It only becomes a variable if it's *used* as one.
> >
> Ah, ok. How would it work when founding several values? Last value
> stands? Or will it create an array?

Last value stands.

> Section: header1
> [some text about header1]
> 
> Section: header2
> [some text about header 2]
> 
> How would it work when using {$:Section}? It would be handy if we could
> do something like {$:Section[1]} and {$:Section[2]}

Not likely, at least not in this first round of things.


> > This is why something like {AnotherPage$PageUrl} can work, because
> > $PageUrl is a function that returns the url for AnotherPage.
> So we can't use something like {AnotherPage$:Name} to get the text
> variable of another page?

Yes, we can use {AnotherPage$:Name} to get the Name: text variable
of AnotherPage (that's really the whole point of the new
markup).,

> > > Does this mean we can currently override default page variables by
> > > setting $FmtPV['Name'] = "'Some other text that is not a page name'"?
> >
> > Yes, it's entirely possible to override the defaults -- in this case
> > it would be $FmtPV['$Name'], however. 
> >
> Changing this defaults just change the page display, right? It might
> change the result of (:if:) markup but doesn't change the workflow of
> pmwiki?

No, it could actually change the workflow of PmWiki.  Anywhere that
{$Name} is used in PmWiki (skin templates, RecentChanges, links, etc.)
would end up using the new definition of {$Name} instead of the default.

Pm





More information about the pmwiki-users mailing list