Is there a variable to access the list-tiddler of the list-links-draggable-macro from within an item?

…in case there is not, it would be nice.
For example to make a button to remove the item like in $:/core/ui/SideBar/Open which astonishingly does not make use of the list-links-draggable-macro

The list-lnks-draggable is a macro of convience. You can build your own with widgets and wiki text and take full contol.

I will try and dig up an example.

If the sidebar open tab contains the function you want to have, imo you should use it as an example and modify it to your needs and make a macro out of it.

I need it three times in variations…so I thought it would be great to make use of the macro.
Thus it would be great to have a variable in there to make it even more convenient :wink:

Stupid me, why didn’t I have the Idea to define that variable outside the macro…
I guess the code of $:/core/ui/SideBar/Open could be shorter using that macro and a template instead.

Did you look at list-links-draggable Macro?

Note the itemTemplate parameter
Optional title of a tiddler to use as the template for rendering list items

Create a tiddler newlistitem containing the following which is the current default listitem

<$link to={{!!title}}>
<$let tv-wikilinks="no">
<$transclude field="caption">
<$view field="title"/>

Now when using the list-links-draggable provide your new tiddler in the parameter itemTemplate:"newlistitem"

  • The above just replicates the normal behaviour
  • But now you can edit “newlistitem” to access the current tiddler and it tags and fields and reformat the way the list appears.

Here is an example of something I like to add;

{{||$:/core/ui/Buttons/edit}}
<$link to={{!!title}}>
<$let tv-wikilinks="no">
<$transclude field="caption">
<$view field="title"/>
  • Add an edit button to every item ion the list (not tested today)