I think my way would be to make a macro and use it instead of links. Something like
<<contact jane>> If "jane" exists, it displays a link. If "jane" doesn't exist, it displays a button labeled "jane". Click on the button to create the new "jane" tiddler. I haven't thought through the details, but I'm pretty sure all this is possible. I'm sure a macro that displays both a link and a button is possible, if nothing else. Some others may have creative suggestions as well. Good luck, -- Mark On Wednesday, January 24, 2018 at 2:53:48 PM UTC-8, passingby wrote: > > So in my TW I have tiddler in which I mention people's names, either in > content or in a field. There are separate tiddlers containing information > about these people. For example a tiddler's name john would have his > contact information, some background information and how I know him > personally etc. Usually I create a contact tiddler with all the various > fields pre-defined and I just fill in some of them. For example, address, > reference, email, phone etc. But sometimes while writing down an event I > would mention some new names like [[jane]]. Now what I want is that when I > click on [[jane]] from an event tiddler it should create a new contact > tiddler with pre defined blank fields. What would be the best way to do it? > > I thought on this line: > Have an edit tiddler template which checks if a tiddler is tagged as > contact. If it is then shows up a button which contains actions which > create the relevant fields if not already existing. So then when I click on > undefined tiddler [[jane]]. Missing tiddler jane comes up. Go into edit > mode to create the tiddler. Tag it as 'contact'. As soon as i add the tag > contact the button shows up which I click to add all the relevant fields in > one go. > > I have this template tiddler: > > \define my-actions() > <$action-sendmessage $message="tm-add-field" $param="address"/> > <$action-sendmessage $message="tm-add-field" $param="phone"/> > <$action-sendmessage $message="tm-add-field" $param="email"/> > <$action-sendmessage $message="tm-add-field" $param="reference"/> > > > \end > > > <$list filter="[is[current]tag[contact]]"> > > > <$button actions=<<my-actions>>> > Click to add contact fields > </$button> > </$list> > > > So this system works, but can this be made better? Can I somehow do away > with the button and trigger the "tm-add-field" message automatically as > soon as the tiddler is tagged contact? or even better create a new contact > tiddler with pre defined fields right from the tiddler link in the other > tiddler mentioning the person's name? > > > -- 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/8adae40e-a7b5-4eea-b653-3e6dd183fccd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

