Skip to content

Instantly share code, notes, and snippets.

@garyconstable
Created January 3, 2015 22:27
Show Gist options
  • Save garyconstable/62bc0cba80a1ffbd85c5 to your computer and use it in GitHub Desktop.
Save garyconstable/62bc0cba80a1ffbd85c5 to your computer and use it in GitHub Desktop.
Twig and craft snippets
//twig ellipsis
{{ myentity.text|length > 50 ? myentity.text|slice(0, 50) ~ '...' : myentity.text }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment