Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#12200 closed (duplicate)

Template filter for truncating text (characters)

Reported by: paulschreiber 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:


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) (3.4 KB) - added by paulschreiber 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by paulschreiber

comment:1 Changed 4 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #5025.

comment:2 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.