Hello,
I’m a new TiddlyWiki-user and I like it very much.
I even managed to format the output of the list-widget as a table.
This works pretty well, but is there a way to hide the table header when there are no entries?
Here’s the macro which formats the output:
\define Items(filter)
<table class="items-table">
<tr class="items-header">
<td>count</td><td style="text-align:left;">description</td><td>updated</td></tr>
<$list filter="$filter$">
<tr>
<td class="items-count">{{!!count}}</td>
<td class="items-description"><$link/></td>
<td class="items-default"><$view field="modified" format=date template="0DD.0MM.YY/0hh:0mm"/></td>
</tr>
</$list>
</table>
\end
Here’s the macro-call:
<<Items "[tag[item]field:location<currentTiddler>]">>
Maybe there is a way to call the macro only when the filter returns some hits (checking it with count[]), but I’m afraid that with my current (filter-)knowledge doesn’t allow me to do this.
Any help would be very appreciated, thank you.
I’m using TiddlyWiki 5.2.5 with Mozilla Firefox browser 112.0