For a content type (Article), when I create a new node and save it, I want to append a field value (for example, Location) to the node title.

There seems to be great answers using custom plugins (Modify the node title with the node ID before saving it) and even modules (How do I build the node title from field values when saving the node?), but they're not applicable to Drupal 9.

If the suggested solution requires creating custom module and overriding a function, then please direct me to some implementation guide and specify files locations as I'm a newbie in writing Drupal code.

有帮助吗?

解决方案

To do this without writing code, the module you want for Drupal 9 is Automatic Entity Label. Nodes are entities, so you can use this to set the label (title).

许可以下: CC-BY-SA归因
scroll top