[pmwiki-users] About {$:var} text-variables

Martin Fick mogulguy at yahoo.com
Mon Sep 11 12:34:14 CDT 2006

--- "V.Krishn" <webmaster at insteps.net> wrote:

> {(function args)Group.PageName$[?:# ...](index)var}
> I was wondering what could this (index) be of use
> off.

When I suggest an index, I was specifically thinking
of using it for wikipaths.  The idea was that if we
were going to look things up by various wiki markup
sections, say for example by bulleted items, then we
could pick the nth bulleted item.

For more ideas, check out the current suggested
wikipath grammar here:

I started hacking a recipe this weekend and it can do
some very rudimentary things here:
There is a lot of debug stuff outputted at the
beginning, ignore that:  I did say hack :).

What this has led me to is to realize that chained
wikipaths need to be rethought somewhat.  Here is an

* Item A1
## Item B1
* Item A2
## Item B2

How can I specify Item B2 by position?  The intent was
to maybe do something like {{$*2##}} where the two
would look at sub items to Item A2.  This leads to the
question, how are sub items defined from a document
structures standpoint?  The example above looks
obvious, but it really isn't.  Here is another example
that might illustrate the difficulty:

! Heading H1
* Item A1
## Item B1
! Heading H2
## Item B2

What would {{$*Item##}} refer to? Item B1? Or does it
include Item B2?  In other words, where does a
subsection end, is there any hiearchy that can actualy
be deduced from a document?  Afterall, Item B2 is
after Item A1, but I don't think that most people
would consider it a sub item to A1.  So this means
that an end to the Item A1's subsection must somehow
be deduced.  Is it the presence of a heading element
If so, what about in this case:

# Item H1
** Item A1
## Item B1
# Item H2
## Item B2

Does {{$**Item##}} include Item H2 or B2? Very hard to
determine.  The wiki doc does not seem to actually
provide a hiearchy even though most of us perceive it
as having one (unless I am missing it?)

Any advice on this delimma is highly sought, I am
currently thinking of saying that a subsection
continues until the next subsection of the same type
with either the same or higher order(?).  In other
words a # or a ## would end a ## section, but nothing
else would.  Somehow though, it does seem like a
heading or should end all non heading sections?

> Could this use eg (.) to denote - 'create
> unambiguous expansion or expand the 
> variables before getting the values back'.
> Other uses could be (>) or (<)

Sorry, I don't uderstand this question?


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the pmwiki-users mailing list