Modifier: dl


Turn a key/value array, otherwise known as a YAML mapping, into an HTML definition list.

food: 
  Delicious:
    - bacon
    - sushi
  Green:
    - broccoli
    - kale
{{ food | dl }}
<dl>
  <dt>Delicious</dt>
  <dd>bacon</dd>
  <dd>sushi</dd>

  <dt>Green</dt>
  <dd>broccoli</dd>
  <dd>kale</dd>
</dl>

Additional Reading

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

Last modified on March 31, 2016