How I Can truncate in show_placeholder

14 views
Skip to first unread message

Eliezer J Romero C

unread,
Oct 6, 2014, 2:51:38 PM10/6/14
to django-cms...@googlegroups.com
Hi everybody, I have a doubt with show_placeholder ,I need truncate or cut the number of characters that brings show_placeholder!

What is the correct method to do this? 

I've tried "truncateword"  but I understand that is not within attributes show_placeholder

Martin Koistinen

unread,
Oct 28, 2014, 8:53:05 PM10/28/14
to django-cms...@googlegroups.com
Heres what I do:

{% render_placeholder myobj.content as content %}{{ content|striptags|truncatewords:50 }}

I had to add the "as" form to render_placeholder to do it, but now its there for everyone =)
Reply all
Reply to author
Forward
0 new messages