Draggable question

91 views
Skip to first unread message

David Gifford

unread,
Mar 7, 2021, 3:02:19 PM3/7/21
to TiddlyWiki

Hi everyone

How can I do this? The snippet below does not work. I kind of knew it would before I typed it. I have a tiddler tagged $:/tags/SideBarSegment, and want it to list the items with the tag below as draggable, but their contents transcluded rather than simple links or checkboxes.

<$list filter="[tag[$:/giffmex/SidebarYes]]" draggable="yes"><$transclude field="text" mode="block"/></$list>

I tried an item template, but adding a transclude widget produced a recursion in the tiddler, since it thinks it is trancluding itself into itself.

I am trying to make the items in the sidebar here (https://giffmex.org/experiments/sidebar.concept.part.2.html) draggable.

Dave

David Gifford

unread,
Mar 7, 2021, 5:05:57 PM3/7/21
to TiddlyWiki

Hmmm.... I seem to be asking for something to be draggable yet also able to be clicked on (details element and tabs). A bit contradictory.

But doggone it, there must be a way, right? Maybe some kind of visually distinguishable handle?

clutterstack

unread,
Mar 7, 2021, 5:33:06 PM3/7/21
to TiddlyWiki
Hi David,

There's definitely going to be a way...

You're trying to get the text field of the list item into the tiddler containing the list? What about using the "variable" attribute of the list widget and putting that as the tiddler attribute into the transclude widget? Then currentTiddler doesn't get messed with.

I haven't looked into how draggable lists work, so I don't know if there are further problems. I do know that I've made draggable clickable things though, so eventually you can get there.

Best,
Chris

clutterstack

unread,
Mar 7, 2021, 5:34:43 PM3/7/21
to TiddlyWiki
Like

<$list filter="[tag[$:/giffmex/SidebarYes]]" draggable="yes" variable="listitem"><$transclude tiddler=<<listitem>> field="text" mode="block"/></$list>

I haven't tested this.

TW Tones

unread,
Mar 7, 2021, 5:40:36 PM3/7/21
to TiddlyWiki
David,

With my experiments I made a Button that could be clicked, you can drop titles on or drag to drop a tag elsewhere, so this is similar and works.

I have being a bit distant from tiddlywiki of late so can't readily find the example.  

Remember a button widget can "wrap" or be inside a section, and you can use the Draggable Widget not just  parameter.

Regards
Tones

Sven Drion

unread,
Mar 7, 2021, 8:40:42 PM3/7/21
to TiddlyWiki
(Not sure if this is a double post, had network problems)

The filter: "[tag[WhatITagButNotMe]] +[remove[WhatITagButNotMe]]"

Something to drag: 
Reply all
Reply to author
Forward
0 new messages