On Tuesday, January 2, 2018 at 3:30:30 PM UTC-8, tobaisch wrote:
>
> What is the mistake in this type of code?
>
> <$list filter="[all[tiddlers]nsort[]] +[removeprefix[{{!!nr}}]]" />
>
Two problems:
1) the brackets on the "removeprefix" filter are wrong. When referencing a
field value, just use SINGLE curly braces, like this:
+[removeprefix{!!nr}]
2) I assume your intention is to remove the number prefix from each tiddler
title, based on the "nr" field of each tiddler. However, the "current
tiddler" context for your filter is the tiddler that *contains* the <$list>
widget, rather than the title of each tiddler found in the first part of
the filter. To do as you want, you need to nest two filters, like this:
<$list filter="[all[tiddlers]nsort[]]">
<$list filter="[all[current]removeprefix{!!nr}}">
...
</$list>
</$list>
-e
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/1f002711-b8e2-41a9-b3d5-5e872325f0f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.