[pmwiki-devel] PmWiki request
The Editor
editor at fast.st
Tue Dec 12 05:34:31 CST 2006
Recently had an idea for tying zap's conditionals in PmWiki's far more
powerful conditional system. It would also decrease the learning
curve as it would use more familiar syntax.
Basically the idea is to use things like
(:input hidden ifexists "parameter|action":) // exists must first be defined
This is supposed to take the parameter, check to see if something like
(:if exists parameter:) would return true or false, and then either do
the action or not. In this way, you could use any defined condition
in a zap form, and also define your own conditionals for use in zap
forms.
Better yet, I'd like to be able to put complex expressions in the
value. Maybe with this syntax: (:input hidden if "expr exists
Group.Name && ! exists OtherGroup.Name|Do Some ZAP action":)
My question is this: What function do I call to get the true/false
returned to me. I've looked at these two possibilities:
function CondExpr($pagename, $condname, $condparm) {
function CondText($pagename,$condspec,$condtext) {
But to be honest, I can't make much heads or tails of either of them,
but dont' think either will work for what I need, as they seem to be
locked into returning markup only. Is there someway PmWiki could be
rewritten slightly to break out the part that determines if true or
false into a separate function? Or if what I need already exists,
could someone point the way?
Cheers,
Dan
More information about the pmwiki-devel
mailing list