twig limit text code example Example: twig limit text { myentity.text|length > 50 ? myentity.text|slice(0, 50) ~ '...' : myentity.text }}