[pmwiki-users] [Fwd: Re: PageTextVariable: own "automatic variable" format] - more ...
Knut Alboldt
pmwiki at alboldt.de
Sat Jun 9 11:53:00 CDT 2007
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 <pmwiki at alboldt.de>
An: pmwiki-users maillist <Pmwiki-users at pmichaud.com>
CC: Patrick R. Michaud <pmichaud at pobox.com>
Referenzen: <447cbad00703181101l3a6f49cqc333c30991edaac2 at mail.gmail.com>
<20070318222849.GA5215 at host.pmichaud.com> <45FFB73B.1020608 at alboldt.de>
<20070320122855.GA20061 at host.pmichaud.com> <45FFE691.5040709 at alboldt.de>
<20070320135909.GI20061 at host.pmichaud.com>
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)
More information about the pmwiki-users
mailing list