4th December 2024 at 8:56am
The following sidebar tabs give examples of grouped lists created by nesting.
Types Tab
For the "Types Tab", the outer list filter as shown below selects each discrete value found in the type
field. The inner list filter selects all the (non-system) tiddlers with that type.
\whitespace trim
<$list filter={{$:/core/Filters/TypedTiddlers!!filter}}>
<div class="tc-menu-list-item">
<$view field="type"/>
<$list filter="[type{!!type}!is[system]sort[title]]">
<div class="tc-menu-list-subitem">
<$link to={{!!title}}><$view field="title"/></$link>
</div>
</$list>
</div>
</$list>
Recent Tab
The list in the "Recent Tab" is generated using the timeline
macro. Here, the outer list filter selects each discrete day found in the modified
field, while the inner list filter selects all the tiddlers dated the same day in the modified
field.
<!-- Override one or both of the following two macros with a global or local macro of the same name
if you need to change how titles are displayed on a timeline -->
\procedure timeline-title() <$view field="title"/>
\procedure timeline-link() <$link to={{!!title}}><<timeline-title>></$link>
\procedure timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified")
\whitespace trim
<div class="tc-timeline">
<$set name="tv-tids" filter=`[!is[system]$(subfilter)$has<dateField>!sort<dateField>limit<limit>]`>
<$list filter="[enlist<tv-tids>eachday<dateField>]">
<div class="tc-menu-list-item">
<$view field=<<dateField>> format="date" template=<<format>>/>
<$list filter=`[enlist<tv-tids>sameday:$(dateField)${!!$(dateField)$}]`>
<div class="tc-menu-list-subitem">
<<timeline-link>>
</div>
</$list>
</div>
</$list>
</$set>
</div>
\end