This form of the set variable widget evaluates the filter and assigns the result to the variable as a space-separated list (using double square brackets for titles containing spaces).
<$set name="myVariable" filter="[tag[HelloThere]]">
<$text text=<<myVariable>>/>
</$set><$list filter="[tag[HelloThere]]" variable=myVariable>
<$transclude tiddler=<<myVariable>> mode=block><br>
</$list><$list filter="[tag[HelloThere]]">
<$transclude mode=block><br>
</$list>This template can then be placed on multiple pages to generate standard warnings.
tags: $:/tags/ViewTemplate
text:
<$list filter="[all[current]tag[Obsolete]]">
This function is obsolete.
</$list>
<$list filter="[all[current]tag[Unsafe]]">
This function is unsafe.
</$list>
<$list filter="[all[current]tag[Obsolete]]">
| !Obsolete | This function is obsolete. |
</$list>
<$list filter="[all[current]tag[Unsafe]]">
| !Unsafe | This function is unsafe. |
</$list>
The problem is that if I write it like this, it doesn't put a newline after each line of the table when rendering the list, so it isn't displayed as a table.
However, if I insert a blank line before each of the table entries, then it ends the entire paragraph before each table line and it displays as a series of one-line tables instead of a single one.
Using HTML <br> divides the text into lines, but the | | |s are then not recognized as a table. There seems not to be an option for "I want a newline here for the purpose of your parser, but that might not mean a newline in the output". Can this be done?
<table><$list filter="[all[current]tag[Obsolete]]"><tr><th> Obsolete </th><td> This function is obsolete. </td></tr></$list> <$list filter="[all[current]tag[Unsafe]]"><tr><th> Unsafe </th><td> This function is unsafe. </td></tr></$list></table>