Introducing the condition plugin. (Version 0.1 attached, docs included)
with your additions you're addressing lots of problems I'm facing right now. Thanks for your efforts and contributions!
I'd very much like to see this in the core, is there a chance?
Whoopsie! I found errors with the "match" parameter and when the widget is refreshed. Late night work can be pretty sloppy, eh?
As compared with the closely-related $reveal widget, conditions are simpler, behave more like $list, and can be executed as a chain. They don't retain contents or animate, and can be based on variables, filtered or transcluded attributes rather than just state tiddlers.
\define testSearchBar(field)
<$if value={{$:/temp/search!!$field$}} match="yes">
Search is "yes"
</$if>
\end
<<testSearchBar text>>
Oh, wait, sorry, shoot. That won't work at all, it'll just expand to the string of the transclusion.
<$if value="(=gt(2,3)=)">
yes
</$if>
<$else>
no
</$else
The only way I can is by setting:
value="FALSE"
myself. Even though (=gt(2,3)=) does indeed return FALSE.