Modifier: ampersand_list


Turn a simple array into a comma delimited string with a friendly little ampersand between the last two items.

YAML
fruits:
  - apples
  - bananas
  - jerky
Template
{{ fruits | ampersand_list }}
Output
apples, bananas & jerky

Additional Reading

Learn how to use and chain modifiers in the Antlers template guide.

Last modified on March 7, 2017