\define body()
Dear $(name)$,
I write to inform you that your pet, $(pet)$ has filed for emancipation.
\end
\define createButton()
<$button tooltip="Create new letter" aria-label="new letter" class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" title=<<title>> text=<<body>> />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text="new letter" /></span>
</$list>
</$button>
\end
<$set name="title" value="New Letter">
<$set name="name" value="Wilson">
<$set name="pet" value="snuffles">
<<createButton>>
</$set></$set></$set>
\define body()
Dear $(name)$,
I write to inform you that your pet, $(pet)$ has filed for emancipation.
\end
I already did support that Mario. It would help.
I have found that unless I can automate building things like new novel buttons or build templates it consumes too much time.
If you look at the core buttons as an example they are not strait forward.
The tip of using a macro for the body and $(variable)$ references is a good one. I have a macro that converts all fields on a nominated tiddler to variables which would work well with this. One reason its good is all values are represented with the same standard, no need to choose between variable, field or tiddler references
I am also keen to enable users, non tiddlywiki enthusiasts to build forms or templates to generate output like one may do with a mail merge so finding an easy template language that I feed with data from tiddlers would be nice. Like someone writes a letter and inserts active variables.
Regards
Tony
\define code-tiddler() $(name)$
\define body()
\define code-tiddler() $(value)$
Dear $(name)$,
I write to inform you that your pet, $(pet)$ has filed for emancipation.
\end