[pmwiki-users] Referencing Page Variables through multiple pages / use markup expressions as pagename base for page variable path / AuthUser htpasswd behavior

Peter Bowers pbowers at pobox.com
Mon Nov 7 02:03:35 CST 2011

On Mon, Nov 7, 2011 at 3:03 AM,  <a.sonderhoff at gassi-tv.de> wrote:
> 2) Is there a way to substring say {$Group} with markup expressions and use the returned string in a new pagename to
> retrieve a page variable (e. g. {NewGroup.{(substr("{$Group}" 10))}$Title}?

I think you've just got some syntax issues there...  A similar idea
seems to be working fine for me:

===(snip from Test.B)===
Directly var in A is {Test.A$:var}

Markup results in {(substr "{C$:source}" 0 1)}

Indirectly var in A is {Test.{(substr "{C$:source}" 0 1)}$:var}

===(snip from Test.C)===

===(snip from Test.A)===
var: This is a variable

When I load Test.B I get

===(snip output from Test.B)===
Directly var in A is This is a variable

Markup results in A

Indirectly var in A is This is a variable

I think it's your markup expression syntax that's messing you up.
Parens inside an MX denote a nested MX, not the arguments for the MX
command.  In other words {(substr "string" 10 1)} instead of
{(substr("string" 10 1))}.


More information about the pmwiki-users mailing list