I've tried an idea of my own and FrD's suggestion. The problem is, that
once the tm-new-tiddler message is sent the current macro stops. So you
can't do any clean-up back in the original macro.
Here's the code I tried using FrD's approach. The last setfield never gets
run, even though it's simple text:
\whitespace trim
<$button tooltip="Clone this 'template'" aria-label="Clone this 'template'"
class=<<tv-config-toolbar-class>> >{{$:/core/images/clone-button}}
<$vars tiddler-template-caption={{!!tiddler-template-caption}}>
<$action-deletefield $field="tiddler-template-caption"/>
<$action-setfield $field=template-source $value=<<currentTiddler>>/>
<$action-sendmessage $message="tm-new-tiddler" $param=<<currentTiddler>> >
<$action-setfield $field="tiddler-template-caption"
$value=<<tiddler-template-caption>>/>
<$action-setfield $field="do-i-happen" $value="Important stuff"/>
</$vars>
</$button>Enter code here...
The sendmessage pre-empts the rest of the code. I think you're stuck with
using ActionCreateTiddler. But it shouldn't be that hard to cycle through
all the fields and insert them into the new tiddler.
-- Mark
On Friday, August 3, 2018 at 2:14:20 AM UTC-7, TonyM wrote:
>
> Frd
>
> Thanks, I have used the work around to indicate template tiddlers by
> creating a matching tiddler templatename/template
>
> In someways this may be better because the templatetiddler is now totaly
> cloned.
>
> Regards
> Tony
>
>
--
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/fa900663-123b-4a63-b579-c0f351ee08d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.