This code looks for all tiddlers where the current tiddler appears in the category field and prints out a list sorted on ‘republish1’ and ‘published-on’:
<$vars sub=[get[republish1]else{!!published-on}]>
<$list filter="[all[tiddlers]contains:category<currentTiddler>!sortsub:date<sub>]">
<$link /> -- {{!!published-on}} -- {{!!republish1}} <br>
</$list>
</$vars>
If the current tiddler does not appear in the category field of any other tiddler, nothing happens. So, this code resides in my view template without causing any problem.
I wanted to convert this simple list into a table. The question was, where do I put the table header? If I put it after the $list, it will create a header above every row. If I put it before the $list, the table header will appear in every tiddler!
How do I solve this problem?