Collapsing/expanding lists

65 views
Skip to first unread message

David Shaw

unread,
May 21, 2021, 4:41:19 PM5/21/21
to tiddl...@googlegroups.com
I'm using the following filter to create a contents list for a TW

<<list-links "[all[current]tagging[]">>

This works OK, but produces a rather unwieldy list of nearly 500 links. I could separate these out into individual tiddlers, A, B, C and so on and use the above with the appropriate addition of a prefix[] filter on the end, but I was wondering if there was a way I could do this in a single tiddler so that, when you select 'A', the A-list expands and then collapses when you select 'A' again. I hope my explanation is clear.

Many thanks,
David Shaw

si

unread,
May 21, 2021, 5:13:34 PM5/21/21
to TiddlyWiki
Here is one approach using the HTML details element:

<$list filter="[enlist[A B C D E]]" variable=letter>
<details>
<summary><<letter>></summary>
<$list filter="[all[current]tagging[]prefix<letter>]">
<$link to=<<currentTiddler>>/>
<br>
</$list>
</details>
</$list>


Of course you need to add the rest of the alphabet. I don't know if there is a quicker way to do this.

David Shaw

unread,
May 21, 2021, 5:27:29 PM5/21/21
to tiddl...@googlegroups.com
Works like a charm! Many, many thanks,

David Shaw

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/fdb9f7cb-d635-4bba-b7b2-db88c3470cb2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages