Is there a way to add a remove-Item button to an itemTemplate used in the list-links-draggable macro?

I just tried to build one but it is quite hard to enter the variables which reuse the listfield and tiddler if they are defined in the macro.

I think, it would be usefull to have a reusable example because I needed this several times and alway ended up rewriting the whole macro - just like in $:/core/ui/SideBar/Open where also the whole macro had to be rewritten.

Is there a way to add a remove-Item button to an itemTemplate used in the listlinksmacro?

  • Do you want to remove it from the list? or
  • Do you want to delete the tiddler?

There is a big difference.

Your link goes to the “list-links-draggable Macro” your question uses “listlinksmacro”.

The list-links Macro has no itemTemplate. But imo it should have one too.

Hi @pmario
Thanks for the clarifications!

  • I only want to remove the tiddler from the list!
  • And it is for the list-links-draggable Macro.

I tried this but it does not work yet…

<$button class="tc-btn-invisible">
<$action-listops $field=<<__field__>> $tiddler=<<__targetTiddler__>> $subfilter="-[<currentTiddler>]"/>{{$:/core/ui/Buttons/cancel}}
</$button>

<$action-listops $field=<<__field__>> $tiddler=<<targetTiddler>> $subfilter="-[<currentTiddler>]"/>{{$:/core/ui/Buttons/cancel}}</$button>

This works… and I am bewildered!
Why <<__field__>> whith __ whereas <<targetTiddler>> without!

This is using \define macro, rather than the new “\procedure” and is a way to “represent a parameter’s value as a variable”, so there needs to be a parameter with the name field as in <<__field__>>.

  • In the traditional macro, “field” can also be substituted $field$ and other variables $(variable)$

In the new procedure pragma and in other places such as functions parameters are now available as variable names eg <<field>> without a need for the underscores.