<$action-sendmessage $message="tm-new-tiddler" text='<$transclude tiddler="$:/category">' tags={{!!title}} />The docs on the official site have some info and examples:
https://tiddlywiki.com/#addsuffix%20Operator
https://tiddlywiki.com/#addprefix%20Operator
https://tiddlywiki.com/#VarsWidget:VarsWidget
If you find them a bit sparse you could try TWScripts for more examples;
https://kookma.github.io/TW-Scripts/#Filter%20Returns%20Only%20the%20First%20suffix%20word
https://kookma.github.io/TW-Scripts/#Simple%20Comparison%20of%20Two%20Variables
or sometimes searching the forum here is the best source of inspiration. They're generally pretty good at answering questions too, whatever the level, from beginner to expert. Good luck.
Hi Mark. Many Thanks. It worked indeed.
However, I must admit I do not follow the code .. what does <$vars> do and where should I read about it?
On Thursday, June 27, 2019 at 11:11:32 PM UTC+1, Mark S. wrote:Try<$vars pre="[[" suf="]]">
<$button>New tiddler
<$action-sendmessage $message="tm-new-tiddler" text='<$transclude tiddler="$:/category">' tags={{{ [<currentTiddler>addprefix<pre>addsuffix<suf>] }}} />
</$button>
</$vars>
On Thursday, June 27, 2019 at 2:54:29 PM UTC-7, Ankit Mittal wrote:Hi,I am trying to create a button that mimics the behaviour of "Create a new tiddler tagged with this one".I used this<$action-sendmessage $message="tm-new-tiddler" text='<$transclude tiddler="$:/category">' tags={{!!title}} />
which works fine so long as title does not have white space but if it has white space it takes each word as a separate tag instead of making whole title the tag.Please can someone help me achieve this?
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/a96a87f0-c0d8-4f4f-8ce7-b21605bf9d9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CADeSwYPDPDd9moWiO4_Jn_Xmmg3yzWbv15s1qc0oD_d3hPnQ5Q%40mail.gmail.com.
I am curious if you have a particular reason to use
text='<$transclude tiddler="$:/category">'
Rather than
text={{$:/category}}
regards
Tony