list-tagged-draggable filtering?

93 views
Skip to first unread message

Dave

unread,
Mar 21, 2019, 12:54:06 PM3/21/19
to TiddlyWiki
As far as I can tell, the only way to have a draggable list is a simple statement like this

<<list-tagged-draggable tag:"Features">>


Is there a way to have draggability in more filtered lists?  This simple example is a little macro I use to add to a tiddler to see any tiddlers tagged by the containing tiddler

\define tgng()


<<list-links filter:"[all[current]tagging[]]">>
\end


Is there a way to make that itself draggable?  I.e. re-ordering would create a list if tagged tiddlers in the current tiddler?


Also, is there a way to add order-by-drag capability to a list like this:

<$list filter="[all[current]tagging[]!tag[exclude]!tag[done]has[priority]sort[priority]limit[20]]">


Thanks,
- Dave


Mohammad

unread,
Mar 21, 2019, 1:12:32 PM3/21/19
to tiddl...@googlegroups.com
Dave,
to see how draggable list works! You can have a customized version or use the concept in your own macro!

--Mohammad

Dave

unread,
Mar 21, 2019, 1:21:37 PM3/21/19
to TiddlyWiki
Thanks! I'll take a look at that :)


On Thursday, March 21, 2019 at 11:12:32 AM UTC-6, Mohammad wrote:
to see how draggable list works! You an have a customized version or use the concept in your own macro!

Dave

unread,
Mar 21, 2019, 4:54:23 PM3/21/19
to TiddlyWiki
Here's an attempt to use a filtered list to make a draggable list:

\define mymegatext()


<$list filter="[!tag[exclude]!tag[done]tag[errands]sort[priority]limit[20]]">
<$view field=title/>

</$list>

\end
\define mybutton()
<$wikify name=mytext text=<<mymegatext>>>
<$action-setfield
$tiddler="myErrands"
   tags="hardcopies"
text=<<list-links-draggable tiddler:"myErrands">>
list=<<mytext>>
/>
<$action-sendmessage $message="tm-notify" $param="ErrandsSetMsg"/>
</$wikify>

\end

<$button actions="<<mybutton>>">
set Errands
</$button>

The problem is that for the tiddler titles that are multi-word (most of them) it makes the list as if each single word was a separate tiddler

I tried doing this:
[[<$view field=title/>]]

but then the result was:

Any suggestions?


Dave

unread,
Mar 21, 2019, 5:17:05 PM3/21/19
to TiddlyWiki
FYI, I also tried commenting out the square brackets like this
[[<$view field=title/>\]\]

but that didn't work either


S. S.

unread,
Mar 22, 2019, 1:56:07 AM3/22/19
to TiddlyWiki
Dave,

I believe you have more than one issue to solve.

1) Get the list generated by filter:"[all[current]tagging[]]"   into a list field of that tiddler, or some other tiddler. This can only be done by an action, such as clicking a button.

2) Use the list field you chose as the field: value of the list-links-draggable macro. I believe you already know how to do that.

\define list-links-draggable(tiddler,field:"list",type:"ul",subtype:"li",class:"",itemTemplate)

Hope that helps.

Regards

Dave

unread,
Mar 24, 2019, 1:46:50 PM3/24/19
to TiddlyWiki
For completion's sake, here's what I ended up with that works now:

[[makeErrandsListSet]]
\define mymegatext()
<ol>
<$list filter="[list[Errands List]]">
<li>* <$view field=title/></li>
</$list>
</ol>
\end

\define mybutton()
<$wikify name=mytext text=<<mymegatext>>>
<$action-setfield
$tiddler="myErrands"
   tags="hardcopies"
text=<<mytext>>
/>
<$action-sendmessage $message="tm-notify" $param="ErrandsSetMsg"/>
</$wikify>

\end

<$button actions="<<mybutton>>">
set Errands
</$button>



and this is the tiddler where I can drag to re-order my list of errands that aren't tagged "done" and set a text file that gets displayed (through Tasker) in my car when I start driving
!Filtered list of tiddlers tagged errands
<<list-links-draggable tiddler:"Errands List">>

<$button>
load recent changes
<$action-listops $tiddler=<<thisTiddler>> $field="list" $filter="[tag[errands]!tag[exclude]!tag[done]sort[priority]]"/>
</$button>
{{makeErrandsListSet}}

[[myErrands]]



Thanks again!! :)




Reply all
Reply to author
Forward
0 new messages