I’d normally use HTML tables, as @pmario suggested; it will give you far more flexibility and control over both the table’s content and its presentation. However, if you really want to keep the wikitext tables, here’s a slightly hacky alternative:
<$let break="""
""">
<$list filter="A B C +[get[text]] +[join<break>]">
<$transclude field="title" mode="block" />
</$list>
</$let>
Where each tiddler looks like this:
title: A
| A1 | A2 | A3 |
<!-- as many rows as you like -->
Again, I wouldn’t use this if you need complex tables or header/footer rows, but it is possible.
Remember that by default, the “pieces” of your table will appear in the order they do in the “xxx” tag dropdown. This will default to alphabetical order by title, but you can drag and drop the titles in the dropdown list to reorder their display sequence.
For easy access to the tag dropdown, you can use <<tag xxx>> to add a tag pill to a tiddler.
If you need a more complicated sorting system, you’ll probably want to use the :sort filter run prefix or one of the sort filter operators (check the documentation on tw-com.) Any additional sorting should go after[tag[xxx]] but before+[get[text]]. For instance:
<$list filter="[tag[xxx]sort[caption]] +[get[text]] +[join<break>]">
<!-- ^^^ to sort by the caption field, rather than the default tag sort -->
<$list filter="[tag[xxx]] :sort[get[caption]] +[get[text]] +[join<break>]">
<!-- ^^^ to sort by the results of the following filter run, which will be applied to each input title -->
@stefan_from_germany, I took the liberty of editing the title of the thread to make it clear that you’re focusing on wikitext tables. I do like the approach you’ve settled on, and it may be useful for someone else in the future!
Also might be useful reference is my recent post about table helper. Note that it functions by splitting wikitext tables, resorting and then reassembling them.
Just for the sake of conversation, and for future novices browsing this thread:
Almost always, in my experience, a table makes sense because there’s structured data involved.
And when there’s structured data involved, you might be better off working with fields rather than creating markdown tables within your tiddlers.
That way, you can do all sorts of powerful stuff with, say, all the info that’s in your third column. Or you could in one quick gesture change the column order, add a column, etc., all without needing to go in and separately edit each of those tiddlers with the xxx tag.
Also, there are powerful solutions — such as Shiraz dynamic tables — that open up new dimensions for your interaction with the data in tiddler fields (such as being able to edit on the fly from the overview table, dynamic sorting, automatic counts and sums in footers, being able to use filter conditions to slice and dice what you’re looking at, etc.)
I say all this gently, realizing your post was a simple “how to…” question, and it has been answered with the help of @etardiff and others. In case you are interested in a conversation about the many powers opened up by working with fields, please do feel free to ask!
you are right if the use case is flexible.
And if the users are able to manage it.
In my use case the content is more or less stable, only in different contexts all or only some of them need to be displayed.
Thank you for your input, it is always welcome and not misunderstood.