On Sunday, January 10, 2016 at 4:01:30 PM UTC-8, cmari wrote:
>
> Now that I have finally figured out how to expand and collapse separate
> parts of a filtered list independently of one another,
> I'd like to be able to expand or collapse the entire list with one click,
> and I can't figure out how to do that.
> I've put up examples of the brick walls I've run into at
> http://cmaritw5.tiddlyspot.com/
> I was hoping to come up with a macro that would allow easy substitution of
> both fields and tags into the filters for the list.
> Has anyone done something like this already?
>
In your 2nd example, you track the state of each reveal using tiddlers
named with "$:/state/category/" as a prefix and a <<qualify>> hash number
as a suffix. The values in these tiddlers are either "show" or "hide".
Thus, to show/hide all reveals at once, you can create buttons that act on
all the state tiddlers, like this:
<$button> close all
<$list filter="[prefix[$:/state/category/]suffix<qualify>]">
<$action-setfield tiddler=<<listItem>> text="hide"/>
</$list>
</$button>
<$button> open all
<$list filter="[prefix[$:/state/category/]suffix<qualify>]">
<$action-setfield tiddler=<<listItem>> text="show"/>
</$list>
</$button>
Note that the buttons only operate on state tiddlers that already exist.
Thus, you need to manually open each individual $reveal to create the
corresponding state tiddler. From then on, the buttons will toggle the
value in that state tiddler (as well as any other $:/state/category
tiddlers that exist).
enjoy,
-e
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/85bb28e4-93e4-4563-a091-54543f190828%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.