same if I want to use a pagetextvariable containing a dash in the name like:

{=$:IP-Address}

Knut

-------- Original-Nachricht --------
Betreff: Re: [pmwiki-users] PageTextVariable: own "automatic variable" 
format
Datum: Sat, 09 Jun 2007 18:33:07 +0200
Von: Knut Alboldt <[EMAIL PROTECTED]>
An: pmwiki-users maillist <[email protected]>
CC: Patrick R. Michaud <[EMAIL PROTECTED]>
Referenzen: <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]>

Hi Patrick !

Patrick R. Michaud schrieb:
  > PmWiki's {$var} markup doesn't recognize spaces or hyphens
> in variable names...  so in order for that to work we'd also 
> have to redefine the {$var} markup.
... snip ...
> 
>   # {$var} substitutions
>   Markup('{$var}', '>$[phrase]',
>     '/\\{(\\*|!?[-\\w.\\/\\x80-\\xff]*)(\\$:?\\w[-\\w ]*)\\}/e',
>     "PRR(PVSE(PageVar(\$pagename, '$2', '$1')))");
It took a while but now I got it running. I change the Markup, so I can
use variable names with spaces now, e.g:

:varname with spaces: value of that var

so far so good. But:
It's working, when I use {$:varname with spaces} as a reference on the
same page.

I still got a problem if I use the refernece it in pagelisttemplates like:

[@
[[#pmprio]]
(:template first:)
(:table class=pagefieldtable:)
(:template each:)
(:cellnr class=pagefieldtablecell:)(:TABEDIT+VIEW {=$FullName}:)
(:cell class=pagefieldtablecell:){=$Name}
(:cell class=pagefieldtablecell:){=$:varname with spaces}          <<<<<
(:template last:)
(:tableend:)

{$$PageCount} Einträge gefunden
[[#pmprioend]]
@]

Here I only get the string "{=$:varname with spaces}" back.

Do I have to change something more to get the roght results ?

Thanks

Knut

(running pmwiki-2.2.0-beta52)


_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to