[pmwiki-users] WikiTrail AddDeleteLine

Martin Fick mogulguy at yahoo.com
Wed Oct 4 13:30:36 CDT 2006


--- Nils Knappmeier <nk at knappi.org> wrote:

> > One extra thing I noticed, it puts each entry on
> > its own line.  I guess that might be needed in 
> > order to add the buttons.  I originally forced 
> > authors to put a \n in their template if they 
> > wanted a newline so as to allow them to create 
> > entries without the newline(maybe to make a 
> > table row...)
>   
>  From my intuition, if should be either
> 
> 1) A complete copy of the whole record, _with_ a
> newline, or
> 2) an enumeration of all values in the same record,
> seperated by commas or something like that.
> 
> For the second choice, I was thinking about a
> different markup that allows to specify the 
> seperator. If I think about it, maybe it should 
> actually be {name*} for choice 1, which is 
> currently {name[]} and {name[separator]}
> 
> So that  (:adl template "{name[;]} is all {sort}":)
> becomes "Apple;  Banana; Pears is all Fruit", if
> $_POST['sort'] = 'Fruit' and $_POST['name'] =
> Array("Apple", "Banana",  "Pears").
> 
> So far nobody wanted anything like this though.

Let me start by saying that I do not need anything
like this.  

I don't think I like the special case handling because
 I do not think it is very flexible.  What you seem to
be addressing with your example is a the ability to
add text before and after iterations.

When I first desinged the pagelisttemplates I used the
same approach but eventually realized that in an
attempt to be flexible I was making things more
complicated and was still not making it flexible
enough.  I think that pagelisttemplates do provide
some good ideas on how to deal with conditionals
within iterations and maybe a similar (which I have
not yet figured out) approach would be better. 
PLTemplates allow one to add text not just before or
after, but within iterations depending on any
conditional.  

In our case things that might be needed for this type
of templating might be the access to the previous and
next variable {{<name}}, {{>name}} and even the key
maybe {{name[$]}} (since they could actually be
supplied from the form instead of using auto
incrementing keys.)

But all this is probably also too complicated.  How
could we evaluate the template and conditionals before
the text actually gets pasted into the page??

I certainly have no burining desire to implement
something like this, but I do think that giving the
users the simple flexibilty to add the \n or not would
be good... just my two cents,

-Martin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list