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

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

As a sidenote, 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 (rather than the state tiddler). The state tiddler uses the checkbox field or something. And it required two exclamation marks in front of it. I spent a lot of time getting it to work through trial and error without understanding it.


.chkbx [type=“checkbox”]{display:none;}
.htag {display: block; border-radius:4px; text-decoration:none; border:0px; margin-top:6px; margin-bottom:4px; padding-left:6px; padding-top:6px; padding-bottom:2px; color: #333; background-color:#AAA}
.exsec { padding-left: 10px; padding-right:10px; border-left:4px solid #AAA; margin-left:20px; margin-right:4px; margin-top:-2px; margin-bottom:-2px; }
.editlink {font-size:smaller; }

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


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


{{$:/core/images/unfold-button}}
<$transclude field=“title” mode=“inline”/>
<$link> [edit]</$link>


</$checkbox>


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

</$list>
</$set>