I'm using the following code in my template to truncate the body of an entry (coming from a Rich Text field):
{{ entry.body | slice(0, 500) | markdown }}
To this, I'd like to add ...
as a string, so that it will output like:
Words words words...
Since the field part I'm using outputs into its own <p>
tag, adding the ...
into the HTML itself has them sitting in two different tags. I've tried using |join
but I must be doing something wrong, its putting the first part into a separate <p>
tag than the ...
Thanks for your help!