Score:0

Field values in node HTML body

do flag

I am using Drupal 10 and trying to edit the body of a node. I want to use the node field values in the HTML body, for example [field_name], but this does not appear to work as it only shows that specific text and not the actual value of the node. I also have tried [field:field_name] with no such luck. Is there any way to do this without having to edit any template file? I have the text format set to 'Full HTML'.

Score:1
aq flag

It sounds like you need to use tokens. Drupal core has token functionality built in but doesn't include fields.

Have a look at this module it adds token support for fields https://drupal.org/project/token and this module https://drupal.org/project/token_filter allows you to use tokens in the text editor

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.