On Friday, January 14, 2022 at 1:24:16 PM UTC+1 Eric Shulman wrote:
...
However, `<<list-links>>` is a merely a "convenience" macro for outputting a bullet list of links.If you want a more specific behavior, you should use the `<$list>` widget directly, like this:
As Eric pointed out `<<list-links>>` is a convenience macro ... and it is really "old" code, where the transclusion "title-fallback" code was the only possibility we had.
With version 5.2.1 we do have a lot more possibilities to create "filtered logic" ... IMO the solution is relatively simple.
We would need to redefine the list-links macro a little bit. See the new `<$set name="field-name" ...` instructions.
```
\define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage)
\whitespace trim
<$type$ class="$class$">
<$list filter="$filter$" emptyMessage=<<__emptyMessage__>>>
<$set name="field-name" filter="[all[current]get[caption]!is[blank]then[caption]else[title]]">
<$subtype$>
<$link to={{!!title}}>
<$view field=<<field-name>>/>
</$link>
</$subtype$>
</$set>
</$list>
</$type$>
\end
```
I think I'll create a PR with a suggestion to change this code and the docs in the core. ...
@Eric could you have a second look at the new code.
-mario