Listfilter with selectwidget

77 views
Skip to first unread message

David Gifford

unread,
Mar 4, 2015, 11:21:53 AM3/4/15
to tiddl...@googlegroups.com
Hi all

I would like to create a very simple tool where I select a topic from a dropdown list of topics and see a filterable list of the tiddlers tagged with that topic. I created the select widget okay, but am not sure how to add the list filter to it. Here is as far as I got. As you can probably see, the select widget would produce a list of tiddlers tagged topic. For example, interpersonal, financial, etc. The selected topic would then go into $:/generated-list-demo-state. So I thought, why not create a filterable list widget based on turning the contents of $:/generated-list-demo-state into a tag? But I am not sure how to do that. Any help?

<$select tiddler='$:/generated-list-demo-state'>
<$list filter='[tag[topic]!is[system]]'>
<option><$view field='title'/></option>
</$list>
</$select>
<$tiddler tiddler={{$:/generated-list-demo-state}}>
<$transclude mode='block'/>
</$tiddler>

<<list-search
"[tag[<$:/generated-list-demo-state>]!is[system]!is[shadow]sort[title]]"
"search:title"
"$:/temp/list-search-sidebar-system-and-shadows"
"$:/_aa/aa/list-item-view-glinks">>

Jed Carty

unread,
Mar 4, 2015, 12:33:27 PM3/4/15
to tiddl...@googlegroups.com
For your list-search filter you should have "[tag{$:/generated-list-demo-state}!is[system]!is[shadow]sort[title]]", you use single { } around transcluded filter operands, < and > are used for variables set using the set widget or as list variables, and in both cases you leave out the [ and ]. With that fixed the list-search should let you search by title through the list of all tiddlers tagged with your selected topic.

If you want to apply an arbitrary filter to the output than you may have to modify the list-search or make your own version.


David Gifford

unread,
Mar 4, 2015, 12:36:38 PM3/4/15
to tiddl...@googlegroups.com
Wow, great Jed! That worked perfectly. I am learning heaps this week thanks to you and others!

On Wed, Mar 4, 2015 at 11:33 AM, Jed Carty <inmy...@gmail.com> wrote:
For your list-search filter you should have "[tag{$:/generated-list-demo-state}!is[system]!is[shadow]sort[title]]", you use single { } around transcluded filter operands, < and > are used for variables set using the set widget or as list variables, and in both cases you leave out the [ and ]. With that fixed the list-search should let you search by title through the list of all tiddlers tagged with your selected topic.

If you want to apply an arbitrary filter to the output than you may have to modify the list-search or make your own version.


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/Q0M09w5_CJM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages