add stuff (e.g. buttons) to draggable list?

60 views
Skip to first unread message

Dave

unread,
Mar 24, 2019, 5:08:01 PM3/24/19
to TiddlyWiki
Hi, not sure if this is doable, but no harm in asking:

Here's a non-draggable list that has added stuff to each item in the list
<table>
<$list filter="[all[current]tagging[]!tag[exclude]!tag[done]has[priority]sort[priority]limit[20]]">
<tr>
<td>{{||add main tags2}}<$link to={{!!title}}><$view field="title"/>
</$link></td>
<td><$view field="priority" /></td>
<td><$range tiddler={{!!title}} field="priority" min="0" max="0.20" default=".01" increment=".01"/></td>
</tr>
</$list>


so you get a list with a button (made from {{||add main tags2}})  and a priority slider thingie


I wanted to add that button to each item in a draggable list, but this doesn't work:
<<list-links-draggable tiddler:"Errands List">>{{||add main tags2}}


Is there a way to get a draggable list with added items that reflect the individual tiddlers in the specified list field?


Thanks,
- Dave

Dave

unread,
Mar 25, 2019, 12:24:45 PM3/25/19
to TiddlyWiki
I suspect its not possible because its a <<macro>>, not a <$widget>.

You can custom build to your hearts content with widgets, but the macro has to be self contained, is that right?

Jeremy Ruston

unread,
Mar 25, 2019, 12:53:55 PM3/25/19
to tiddl...@googlegroups.com
Hi Dave

The list-links-draggable macro accepts an "itemTemplate" parameter where you can specify the title of a template to be used for rendering each item in the list. The default template is just a link to the current tiddler, but you can put buttons etc. in there too.

Best wishes

Jeremy

On 25 Mar 2019, at 16:24, Dave <ceda...@telus.net> wrote:

I suspect its not possible because its a <<macro>>, not a <$widget>.

You can custom build to your hearts content with widgets, but the macro has to be self contained, is that right?

--
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/d067ec8b-5681-413c-93a7-32671c32b284%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave

unread,
Mar 25, 2019, 3:28:12 PM3/25/19
to TiddlyWiki
Thanks Jeremy,

I'll Google itemTemplate + draggable and will post here if I can make anything clearer for others with an example.

Reply all
Reply to author
Forward
0 new messages