You are getting what you are asking for;
[<currentTiddler>fields[]prefix[field-name]]
- For the current tiddler
- Get all field names on the on the current tiddler
- But only “fieldnames” with the prefix “field-name”
So I am guessing what you really want is the value in each fieldname. To do this we first need the list of fieldnames and then we need to retrieve the value for each fieldname;
<$list filter="[<currentTiddler>fields[]prefix[field-name]]" variable="thisfield">
<$link to={{{ [all[current]get<thisfield>] }}}>❮❮</$link>
</$list>
However I am suspicious that you do not have multiple fields with the prefix “field-name”.
This example shows that, as a rule, a filter usually returns one item or a list of items and not two lists of different items.
- For example the list widget above returns a list of fieldnames,
- it can’t return a list of fieldnames AND a list of fieldvalues.
Although people often avoid nested lists they can be very helpful;
<$list filter="[<currentTiddler>fields[]suffix[-link]]" variable=fieldname>
<$list filter="[all[current]get<fieldname>]" variable=fieldvalue>
<<fieldname>>=<<fieldvalue>><br>
<$link to=<<fieldvalue>> > <<fieldname>> </$link>
</$list>
</$list>
So inside the inner list we have access to all values that each of the filters determined for us.
- Notice how the lists set their own variable name so the
<<currentTiddler>>
stays unchanged.
- Notice how in the inner list
- we need to both state again we are referring to the “all[current]” tiddler
- The inner filter also references the value found in the outer filter