snake

The snake filter takes a string and creates a lowercase version of it with words separated by underscores instead of spaces. It's called snake-case.

{{ 'apples and pears'|snake }}
{# outputs "apples_and_pears" #}

< Back to the list of filters