You can replace all[tiddlers] with any smaller set of tiddlers that you’d like to consider for this treatment. I assume you want to sort by date within the year, but you can leave that part off if you don’t.
Side note: you might want to consider using TiddlyWiki’s date format (docs, Grok TiddlyWiki) instead of your dot-separated format – this way you’ll be able to ask TiddlyWiki to do things like “find all tiddlers with the published date in the last 2 years.”
will not do that, and I’m loosing the fields ‘erstellt’ and ‘tags’ ind the output list.
To clarify:
Each tiddler has a field: ‘erstellt’ with long date format eg. ‘29. Dezember 2021’ and a corresponding ‘published’ field with ‘2021.12.29’.
‘created’ might be today…
Any idea, how to build the <$list filter= ?
Thanks
By the way, the snippet you quoted is missing the closing </$list> tag. It sort of doesn’t matter in this case since TiddlyWiki inserts missing closing tags at the end of the tiddler, but it would be a good idea to add it to avoid issues if you end up adding something to the end of the tiddler later.
It looks right to me and the filter worked for me. Can you export a couple of tiddlers that this should match, as well as the one you’re working on, and attach them here?
I don’t think this is causing the problem, but you do appear to be missing a closing </small> and a </span> and several </div>'s too – go through and double-check that you have a closing tag for each opening tag.
In your test tiddler, “The last one”, the published field has a value of “2020.12.21”, but your snapshot shows that your input (the value to match) was entered as “2021”. Thus, there is no output. Entering “2020” does produce output.
Also, note that you can simplify the filter syntax by using prefix{!!selection}, like this:
With the code you gave us, both my filter and Eric’s work as described, at least in my wiki. There must be something different in your other tiddlers compared to the sample tiddler you provided, or in your wiki’s code or settings.
Is it possible you have an old version of TiddlyWiki? :filter was introduced in 5.1.23 (I think?), so if your version is older than that you might be getting bad results because of that.
Edit: The bug I referenced in an earlier version of this post was in subfilter, not in :filter.
Exporting in .tid format only exports a single tiddler, so we only got one of them (The last one). But I created other tiddlers with different published values and it still worked fine, so that shouldn’t be the issue.
If you export these three tiddlers in JSON format (so you get them all) along with your search tiddler and paste them into an empty.html on your own, what happens?
OK, I think I found the problem – in 5.2.0, the :filter prefix started modifying currentTiddler to match the current item being filtered, so {!!selection} is referring to the selection field on the tiddler you’re searching for, rather than on the tiddler containing the search the user has entered. I haven’t slung enough filters around in 5.2 yet to remember this.
…and then replacing {!!selection} in the filter with <selection>.
I am baffled on why it worked for both Eric and me in the wikis we tried it in, but not in empty.html (for either you or me), though, which suggests there is something I am still not quite understanding.
The variable defined by the <$set> is only valid until the matching </$set>. Thus, you need to moved the </$set> down so it is properly nested in between the closing </div></div> sequence.
In the filter, you need to change from using {!!selection} (a field transclusion) to using <selection> (a variable reference).