After some efforts I stumbled upon this solution for a macro which displays 
a tiddler link if the contact tiddler exists and a button to create one if 
it does not. Please have a look and let me know if this is actually a 
proper way to do it or should i be doing in some other way:

\define contact(name)
<$list filter="[title[$name$]is[missing]]">


<$button>
<$action-createtiddler
$basetitle='$name$'
tags='contact'
address=''
phone=''
email=''
reference=''
birthday=''
$savetitle={{ContactMacro!!newContact}}
/>
<$action-sendmessage $message="tm-edit-tiddler" $param={{ContactMacro!!
newContact}}/>
create $name$
</$button>
</$list>
<$list filter="[title[$name$]is[tiddler]]">
[[$name$]]</$list>
\end



My concerns and confusion is:

1. It seems that list widget is being used for something other than what it 
is supposed to be used for. It is meant for producing lists, whereas here 
it is being used as a mode for implementing a check. Isn't this a hackish, 
non-standard way?
2. I could not find any way to implement an if-then-else logic. Is this so, 
that it is not possible using provided widgets?
3. Lastly how do I implement  AND and OR filters in a list widget? 

-- 
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/95ad2265-0b51-4788-a5b8-6fd89a689df6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to