[tw5] Re: Any idea how to collapse/expand section within a tiddler

Sorry I didn’t whittle this down more, but it might be interesting for several reasons.

I initially got a portion of this somewhere else, but I have added to it a lot. It works.

As a sidenote however, I’m pretty confused about how/why the checkbox field works like this (it seems to be interchangeable with the state tiddler?). That’s the bit I got somewhere else.

In any case, I used the qualify macro to name the checkbox field, as well as the state tiddler, which has two exclamation marks in front of it. I spent a lot of time getting it to work through trial and error without understanding it.

$set fieldName=<<qualify “showdit”>>>
<$list filter="[tag[Wiki Related]sort[title]] -[regexp:title[^Draft of.*]]">

.exheading [type=“checkbox”]{display:none;}

<$checkbox field="<>" checked=“yes” unchecked=“no”>

<$transclude field=“title” mode=“inline”/><$link>[edit]</$link>


<$reveal state="!!<>" type=“match” text=“yes”>
<$transclude field=“text” mode=“block”/>