[pmwiki-users] Extracting a value in an array of included variables

Patrick Provinciael patrick.provinciael at gmail.com
Mon Jan 11 16:52:45 CST 2010


I was wondering if it is possible to include an array of variables and then
to extract a certain variable. Example:

(:include group.pagename vararray="first, second, third":)

I know this should somehow be possible with string manipulation (I still
have to figure out how). I'm wondering if it is possible in an easier way.

The reason I ask, is that I want a variable with a variable number of
entries (which is not that easy with string manipulation, if at all
possible).

To be more precise, what I want to be able to do on the included page is:

His relatives are: [[First]], [[Second]], [[Third]].

With other words, I want to be able to make a link of every relative (to
that relative's page). For this I need to be able to extract the variables
one by one.

With String Manipulation, I would just have to replace the separators ", "
with "]], [[" and append a [[ and a ]]. But what if I want to be able to
refer to the first in a separate way?

So yeah, these are quite some problems. Any ideas?

-- 
Patrick Provinciael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100111/495205c0/attachment.html 


More information about the pmwiki-users mailing list