Display lists naturally with the In Other Words module for Drupal
2023 June 15, Thursday, at 6:43am
Clayton Dewey and Benjamin Melançon
It is common for a Drupal site to list multiple items. It could be several authors of a single article, the days a recreation center is open, or the f
### Punctuating Lists
If an article has multiple authors (using a user reference field or a content reference field), Drupal core displays each on
A screenshot shows whitespace surrounding left-aligned text, with a bold label "Author(s):" in a left-hand column and in a right-hand column "Clayton
Those *could* be separated by a comma using CSS. For example, "By Clayton Dewey, Ben Melançon, David Valdez."
A more natural display, though, woul
A screenshot of the Format configuration for a field set to In other words: List. The options are what are described in this post, such as "Join symb
(Technically, there is one formatter each for text lists and for entity references, but all the options which In Other Words adds are the same for bot
A screenshot shows the headline "Display Lists Naturally with the In Other Words Drupal Module", some whitespace, and then as a single line "By Clayto
We could also choose not to connect the final items with a comma, if we were ignoramuses unaware of the Oxford comma. In this case for our example we
### Shortening Sequential Lists
In Other Words can also shorten sequential lists by skipping over the items in the middle of the sequence. For exa
A screenshot of a field's Format settings for In other words: Sequential terms. The options are what are described in this post, such as "Connecting
This same functionality is theoretically possible for other list fields, but In Other Words does *not* currently support summarizing text and numeric
### Conclusion
With the In Other Words module, it is now possible to keep your structured content and display it naturally. The logic of how a lis
A large lower case letter i surrounded by tiny letters, that would spell out "capitalism" if they weren't crushed and falling over from the first i.
"Word as Image" by Ji Lee is licensed under CC BY-NC 4.0.
Read more