Clarification: How filter operator, :filter, and :map run prefixes work?

Hi @Mohammad, just wanted to add my two cents regarding the :filter[] run prefix.

Although there are currently no examples in the doc that shows such construction, one can use filter variables with run prefixes.

Only, we must use the subfilter operator in order to load the subfilter (as usual in fact). For instance, one could modifly you last demo example from:

<!-- generate output -->
<$list 
  filter="[subfilter<__scope__>filter<listfilter>sort[title]]"
  template="$:/core/ui/ListItemTemplate" 
/>

to:

<!-- generate output -->
<$list 
  filter="[subfilter<__scope__>] :filter[subfilter<listfilter>] +[sort[title]]"
  template="$:/core/ui/ListItemTemplate" 
/>
2 Likes

Hi Xavier,
Lovely! Many thanks for your input!

Does this violate conclusion 5 above?

No, the :filter filter run itself cannot be a variable. However just like any other filter run you can use variables inside it.

Thank you Saq, so I leave conclusion 5 intact! I appreciate to correct me if I misunderstood any part, then I will revise the conclusion above!

Hello @Mohammad,
I would like to have in the output also my user field ‘erstellt’ like
grafik

How can this be done (with CSS style)?

Thanks in advance!
Stefan

The output generated here

Instead of template="$:/core/ui/ListItemTemplate" use your own template!
So you can display any fields you like with any format including formatting using CSS.

Thanks @Mohammad.

I solved it like:

<!-- generate output -->

<$scrollable class='tc-scrollable-demo'>

<span style="font-size: 0.8em;">
<$list  filter="[!has[Draft.of]!is[system]has[erstellt]!sort[published]subfilter<__scope__>filter<listfilter>]">
<br>
<$link to={{!!title}}><$view field="title"/>
</$link>
<span style="font-size: 0.7em; color:rgb(144, 238, 144)" >&nbsp;<$view field="erstellt"/></span>

</$list>

</span>

</$scrollable>