Hi Tony,

I figured this might be of interest for your collection, there is another way to do conditionals within certain limits if one has the "Tinka" plugin installed. Specifically, it includes a plugin similiar to the reveal widget in its function but also allows you to check for regex expressions. An example use (taken straight from the error-checking section of Tinka):

|<!-- Check whether a plugin title was given --> <$tinka-check text={{!!create-title-org}} pattern="^[^\s]+$"> <$tinka-filter verb="fail"> <$action-setfield $tiddler=<<TinkaVars>> result="true"/> <$action-setfield $tiddler=<<TinkaVars>> errorTitle="The plugin title is not allowed to be empty or contain whitespaces."/> </$tinka-filter> <$tinka-filter verb="pass"> <!-- Do something else, plugin title is valid. --> </$tinka-filter> </$tinka-check> |

This is entirely undocumented, but I think its a neat way to do a conditional entirely with action widgets (all of those are). Note that "pattern" could also just be a value of another tiddler field, in which case the verbs "pass" and "fail" would correspond to "match" and "nomatch" for the reveal widget. It does only work for action widgets though, since nothing is rendered.


/Andreas

||

--
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/00a4764d-f331-2602-0e26-9fd032ff1e0d%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to