how to get multilist field value using scriban?

137 views Asked by At

I am trying to get multilist field in sxa using scriban but not able to do. only able to get the items as child. is there any way to get multilist field value

I used scriban code to get the multilist field items but I am not seeing anyway get multilist field values

1

There are 1 answers

0
Marek Musielak On

You can use sc_followmany

{{ for i_product in (sc_followmany i_page "Related Products") }}
  <h2>{{ sc_field i_product "Title" }}</h2>
  <b>Content</b>:{{ sc_field i_product "Content" }}
{{ end }}

Here is the source: https://doc.sitecore.com/xp/en/developers/sxa/101/sitecore-experience-accelerator/the-embedded-functions-for-the-scriban-template.html