Created
January 3, 2015 22:27
-
-
Save garyconstable/62bc0cba80a1ffbd85c5 to your computer and use it in GitHub Desktop.
Twig and craft snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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