Introducing the *condition* plugin. (Version 0.1 attached, docs included) It provides *$if*, *$else* and *$else-if* widgets that choose whether to show or hide their contents based on simple text conditions. It pairs well with my formula plugin <http://evanbalster.com/tiddlywiki/formulas.html> and its default "truthy" conditions handle boolean values.
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. The *$else* and *$else-if* widgets have some special uses, depending on what they're placed after... - After a* $list* widget, it will display when the list is empty. - After a *$reveal* widget, it will display when the former's contents are hidden. - After an *$if* or *$else-if*, it will display only when earlier conditions were all false. This was a quick evening project, so it could have bugs. Please test and remark here if you find any issues. Future versions will probably live in the Formulas project. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/64f5a547-12e1-44e7-9e83-dcb547690274%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
condition.json
Description: application/json

