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

Patrick R. Michaud pmichaud at pobox.com
Fri Sep 8 08:15:46 CDT 2006


On Fri, Sep 08, 2006 at 01:59:57PM +0100, Américo Albuquerque wrote:
> Hello
> 
> I've been reading this thread and I'm a little confused of what you want 
> here
> We already have two cookbook recipes that allow to set variables, are 
> you asking for a different way of setting variables?

We're looking at a more natural way of setting variables than 
the recipes' (:set var=...:) markups.  In other words, there are a
lot of pages where

    Summary: a page summary             ||Summary: ||a page summary||
    Version: 2006-09-08                 ||Version: ||2006-09-08    ||
    Status: Stable                      ||Status:  ||Stable        ||
    From: Pm                            ||From:    ||Pm            ||

are a lot more natural to write and display than

    (:set Summary='a page summary':)
    (:set Version='2006-09-08':)
    (:set Status='Stable':)
    (:set From='Pm':)

In short, natural markups often make the best markup.

We're also looking at a better way of extracting variables, by using
{$:var} instead of {$var}, to make it clear it's coming from the page
markup text.  This helps to avoid conflicts that might arise from

    (:set Name='Patrick')

which conflicts with the existing {$Name} page variable.

> Using the recipes above we define values that are not displayed. The 
> problem using either recipe is the same, you can't set the variables 
> inside a (:if:) and use it as a (:if:) clause at the same time without 
> changing the core and even there you can't expect it to work like it 
> would in a programming language

Yes, we're not proposing to resolve this particular issue ... at
least not yet.  It's still the case that page variables would be
defined for an entire page, regardless of any (:if:) constructs.

Pm




More information about the pmwiki-users mailing list