Skip to content

Instantly share code, notes, and snippets.

@dustinwalker
Created February 18, 2014 15:58
Show Gist options
  • Save dustinwalker/9073721 to your computer and use it in GitHub Desktop.
Save dustinwalker/9073721 to your computer and use it in GitHub Desktop.
Truncate field and add ellipse at end
{#
# FIELD.NAME is name of field.
#}
{{ FIELD.NAME|length > 155 ? FIELD.NAME|slice(0, 155)|striptags ~ ' ...' : FIELD.NAME }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment