Filling table rows according to tiddler fields

Hi, for my exercise on migrating from WordPress to TiddlyWiki I would like to create tables whose rows are present or not, depending on if a particular field is present on the tiddler.
For example, the table:

| !Member | {{!!title}} |
| !Project | {{!!project}} |
| !LinkedIn | {!!LinkedIn}} |

will have a !Member row, as any tiddler has the title field, but the !Project or !LinkedIn rows will be present only if the project and LinkedIn fields are present in the tiddler. The resulting table will have three, two or one rows, according to the presence of the corresponding fields in the tiddler. Is this possible in TW and if yes, how?

TIA,

This is where I usually abandon wikitext tables and switch to HTML tables. So an entry would look like:

<$list filter="[<currentTiddler>has[project]]"><tr><th>Project </th><td> {{!!project}} </td></tr></$list>

This will create a row for a tiddler if it has a project field.

You would wrap your lines with <table>...</table> tags of course.

2 Likes

I second this course of action. WikiText tables are great for throwing together a table manually but as soon as the <$list /> widget enters, WikiText tables fall apart for me.

3 Likes