Martin, I use a similar method, in my first and now old plugin https://tiddlywiki.psat.com.au/mymenus/ to list different menu options. You may find some methods within that. The sorting can be done with the appropriate sort operator especially if your fieldnames are logically sortable eg 1 2 3.4 10 50 11 use the nsort operator. Its also ok to have luke-1 luke-2 luke-3.4 luke-10 luke-50 luke-11 as you can either remove the prefix or since the prefix is the same it will still sort correctly.
You can do this in a filter [all[current]fields[]prefix[luke-]sort[]] I use [all[current]fields[]prefix[menu-item-]sort[]] and [all[current]fields[]prefix[menu-item-]*nsort[]*] should work Or you could have a subfilter remove items \define standard-fields() created modified text icon caption .... And the filter [all[current]fields[]] -[subfilter<standard-fields>] Regards Tony On Thursday, February 13, 2020 at 9:32:34 PM UTC+11, Martin Pusch wrote: > > Thanks, Joshua and Mat! > > I tried to modify your example code to get a better understanding. This is > my result so far: > > <$tiddler tiddler="John 3"> > <$list variable="line" filter="[<currentTiddler>fields[]sort[]]"> > <p><code><<line>></code> <$transclude field=<<line>> /></p> > </$list> > </$tiddler> > > I'm struggling with two problems: > > > 1. How to narrow down the result? At the moment, I get all fields as a > result, including "creator", "created" and such. I want to get just > certain > fields, for example 3 … 5, or 9 … 11. I tried to filter the result, but I > didn't manage to do it. > 2. How to sort the resulting fields as numbers? At the moment, they > are sorted alphabetically. I get an order like this: 1, 10, 11 … 19, 2 and > so on. But I want an order like 1, 2, 3 … . For this, the field names have > to be seen as numbers, not as text strings. How to achieve this? > > I've read quite a lot of text in the last hours, and I tested all kinds of > ideas. But I didn't manage to catch the fish – I need more teaching … > > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/46101979-57a0-4b04-8217-c445bd21cc06%40googlegroups.com.
