Option to choose a different body field to get the node data from

Created on 1 March 2022, over 3 years ago
Updated 9 March 2023, over 2 years ago

It would be usefull to make it possible to choose a different body field to get the node data from. At the moment, this is fixed in code:

$query->leftJoin('node__body', 'nb', 'nb.entity_id = nfd.nid');

Which means that the node data doesn't get displayed if the node doesn't have a body field.

Ideally, this could be different for each content type and configurable through DS.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium ΓΈkse

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.

  • πŸ‡«πŸ‡·France GaΓ«lG Lille, France
  • Status changed to Needs work 6 months ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    If anyone needs this, please provide a MR with tests. Thank you!

  • πŸ‡©πŸ‡ͺGermany anruether Bonn

    Could we add the information that the body field is required for the module to work to the project page and readme?

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @anruether definitely yes! I'm also absolutely not against making this editable - the point is just about complexity, because we either have to set the option per bundle or ensure the field exists in the enabled bundles.

    I also don't like the hard-coded body field that much, but it's at least a simple >80% solution. What about maybe introducing the setting in config first and do the UI later? Anyone interested to implement that?

Production build 0.71.5 2024