[pmwiki-users] Page text variable - is this possible?

Johan Bengtsson elijah at chalmers.se
Fri Feb 10 08:19:37 CST 2017


On Fri, 10 Feb 2017, Johan Bengtsson wrote:

> On Fri, 10 Feb 2017, Petko Yotov wrote:
>
>> For a "page text variable" you would write "{Group.Page$:OTHERVAR}" note 
>> the ":".
>> 
>> Yes, it is possible, think of it as instead of "{Group.Page$:OTHERVAR}" you 
>> have written in that place the content of that variable from the other 
>> page.
>> 
>> That means if you have ":)" somewhere in that other content, you may break 
>> the current variable which will be shortened.
>
> OK! Actually what I want to do is something like this:
>
> Page Main.Test1 with content:
>
>
> (:FOO:bar:)
>
> {$:FOO}
>
> Page Main.Test2 with content:
>
> (:FOO:{Main.Test1$:FOO}:)
>
> {$:FOO}
>
> "bar" is printed on both of these pages when saved.
>
> Then I have a pagelist:
>
>
> (:pagelist $:FOO=bar:)
>
> but only Main.Test1 is listed.
>
> It seems like pagelist have a problem with variables set this way?

OK, I came up with a solution myself:

Doing:

(:pagelist if="equal {$:FOO}  'bar'":)

worked.

-Johan Bengtsson




More information about the pmwiki-users mailing list