Skip to content Skip to footer navigation

Ampersand List Modifier

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

fruits:
- apples
- bananas
- jerky
{{ fruits | ampersand_list }}
{{ Statamic::modify($fruits)->ampersandList() }}
apples, bananas & jerky