How can I embed the content of a field into the content of another field? If I have a news site where I can select a source e.g. a press agency (given by a Taxonomy field) when creating a new article, how can I put this source at the beginning of the article text when viewing it? Like this:

(SOURCE) Beginning of article blabla............................

I already found a solution by using three different custom templates for getting rid of all the html wrappers and then floating the article text around (SOURCE), but there must a better solution like manipulating the node array or sth?
You can combine two fields in hook_ENTITY_TYPE_view()

function mymodule_node_view(&amp;$build, $entity, $display, $view_mode) {

  if (isset($build['field_source'][0]['#markup']) &amp;&amp; isset($build['body']['0']['#text'])) {

    $build['body']['0']['#text'] =
      '&lt;strong&gt;(' . $build['field_source'][0]['#markup'] . ')&lt;/strong&gt; ' .
      $build['body']['0']['#text'];

    unset($build['field_source']);

  }
}


and unset the added field to avoid double content.

You can also add html tags if they are allowed in the text format.

This is an example. You have to look into the build array after you've configured the display mode in ui and adjust the array keys.