Allow for expandable text with "Read more/less" links in Default field formatter

Created on 9 December 2019, over 5 years ago
Updated 7 April 2025, 2 months ago

In Views field configurations, the Default formatter's Rewrite Results section has a checkbox:

Add a read-more link if output is trimmed

...with two options, a label and a path.

While there are certainly use cases for this, it seems less useful to me than having this option:

Add read-more and read-less links for expanding and collapsing the full text

<!--break-->

This option would use JavaScript (JS) to expand and collapse the full field text by clicking on the links. With this approach, no link is required, and saves users the trouble of having to come up with one.

We should probably just add the new option as I'm sure folks are using the old one. We could, however, deprecate the old one at some point.

This behaviour is implemented in a different formatter with the Readmore Contrib module, but I don't see why we can't get this into Core with the default one.

Feature request
Status

Active

Version

11.0 🔥

Component

views_ui.module

Created by

🇨🇦Canada colan Toronto 🇨🇦

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