Hello,

How can I detect whether the template tag truncatewords_html has
truncated the html text or not? My current template code is as follows:

        {{ object.body|truncatewords_html:100|removetags:"span"|safe }}

        <br />

        <a href="{{ object.get_absolute_url }}">{% trans "Read the rest" %} 
ยป</a>



However, I only want to display the "Read the rest" link, IF the object
body has been truncated. For example, if the incoming text is shorter
than 100 words, there is nothing to truncate, but my current template
will still display the "Read the rest" link--which is not right, as
there is nothing more to read.

Any ideas?

Thanks,
J


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to