Checkbox in front of hits.

41 views
Skip to first unread message

vinvi...@gmail.com

unread,
Mar 16, 2021, 6:07:46 AM3/16/21
to TiddlyWiki
Hello,

The following code displays a list of tiddlers and a checkbox in front of them. By clicking the checkbox, the relevant tiddler is tagged to the current tiddler.



\define tagging() $(currentTiddler)$

<$list filter="[!is[system]search:text[Specific-template]search:title[,]]" variable=tagname>

<$checkbox tiddler=<<tagname>> tag=<<tagging>> ></$checkbox> <<tagname>>
</$list>



Meanwhile, the list of tiddlers has grown so long that it is no longer workable. I want a search box instead.

I want to modify the code below from the Shiraz plugin. But don't know how to fit; <$checkbox tiddler=<<tagname>> tag=<<tagging>> ></$checkbox> <<tagname>></$list>  in.




\define tagging() $(currentTiddler)$
\define list-search-checkbox( filter:"[!is[system]]", search:"search:title", template:"$:/core/ui/ListItemTemplate",
 class:"", stateTiddler:"", placeholder:"keywords")

<$set name="state" filter="[[$:/temp/list-search-checkbox]addsuffix[/$stateTiddler$]addsuffix<qualify>]">
<div class=<<__class__>> >
<$edit-text tiddler=<<state>> type="search" tag="input" default="" placeholder="$placeholder$"/>
</div>
<$reveal state=<<state>> type="match" text="" class=<<__class__>> tag=div>

<$list filter="$filter$" template=<<__template__>>/>
</$reveal>
<$reveal state=<<state>> type="nomatch" text="" class=<<__class__>> tag=div>
<$set name=term tiddler=<<state>> field="text">

<$list filter="$filter$+[$search$<term>]" template=<<__template__>>/>
</$set>
</$reveal>
</$set>
\end

<!-- from Tobias Beer list-search with modification. Author: Jeremy Ruston-->



Thank you,
Reply all
Reply to author
Forward
0 new messages