Add modifier to trim token length

Created on 13 January 2021, almost 4 years ago
Updated 18 January 2024, 10 months ago

Problem/Motivation

When using tokens for things like creating folders for file uploads, or URL's in Pathauto, some tokens can return very long strings. It would be nice to have a length modifier where you can simply specify the maximum number of characters to return.

Example:

[token] = "This is a very long string returned by this token and might create a really long file name"

[token-modifier:{length:10}:{token}] = "This is a "

✨ Feature request
Status

Needs work

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States iwant2fly VA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024