How can I limit the length of the text, e.g., 50, and put three dots in the display?
{% if myentity.text|length > 50 %}
{% block td_text %} {{ myentity.text}
I know this is a very old question, but from twig 1.6 you can use the slice filter;
{{ myentity.text|slice(0, 50) ~ '...' }}
The second part from the tilde is optional for if you want to add something for example the ellipsis.
Edit: My bad, I see the most up-voted answer do make use of the slice filter.