I have created a template for a button. I'm trying to turn it into a macro 
that has the option to also add <<currentTiddler>> as a tag. It's not clear 
to me from the manual how to do this so I would really appreciate any help.

Here is a simplified example to illustrate what I mean. Say this is my 
button:

\define add-tiddler()
<$button><$action-sendmessage $message="tm-new-tiddler" title=<<now>> tags=
"tag1" />
New Tiddler
</$button>
\end

I'm trying to modify the macro so that <<add-tiddler tag:"false">> would 
run something like this:

<$action-sendmessage $message="tm-new-tiddler" title=<<now>> tags="tag1" />

While <<add-tiddler tag:"true>> would run this:

<$action-sendmessage $message="tm-new-tiddler" title=<<now>> tags="tag1 [[<
<currentTiddler>>]]" />

I'm trying to avoid creating two separate templates/macros because my 
actual button code is pretty long and it will be awkward to have to edit 
both every time I want to make a change.

Thanks in advance for your help.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f79184b4-ee3c-4e5e-a7d2-e9aacfe0c278%40googlegroups.com.

Reply via email to