Learn

sentence_list

Turns a YAML list into a sentence list

Sample Usage

{{ categories|sentence_list }}

If {{ categories }} looks like this:

categories:
  - egg
  - bird
  - house

The output would look like this: egg, bird, and house. When there are only two items in the list, no commas are used: egg and house. When there is only one item in the list, only that item is displayed: egg.

Parameters

This modifier has no parameters.

This article was last updated on March 30th, 2016. Find an error? Please let us know!