Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there a way to display node body and cut it after a given amount of characters or words?
[node:summary] only works when a node summary is given in the node itself
Comments
Comment #1
jelo CreditAttribution: jelo commentedI have the same question related to any long text field (without summary). Use of tokens for example with modules such as metatag require certain length limitations, e.g. a page description could use a field value, but right now it does not seem to be easy to restrict the length of the output.
All text field tokens have options such as: "The following properties may be appended to the token: value (Text), format (Text format)". Like maegras I think it would be very useful to be able to restrict length, e.g. fieldname:value:300.
No idea if this could be added in a generic way to text field tokens?
Thanks, J.