Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12200 closed (duplicate)

Template filter for truncating text (characters)

Reported by: Paul Schreiber Owned by: nobody
Component: Template system Version: 1.1
Severity: Keywords: text string truncate characters
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There's a template tag for truncating text based on word count (truncatewords), but not on character count. I wrote truncate() (truncate_head(), truncate_middle(), truncate_tail()) to do this.

Attachments (1)

truncate.py (3.4 KB) - added by Paul Schreiber 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Paul Schreiber

Attachment: truncate.py added

comment:1 Changed 7 years ago by James Bennett

Resolution: duplicate
Status: newclosed

Duplicate of #5025.

comment:2 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top