How to insert fields into a link field in twig? We have several fields on our Article content type, one of which is a Link field. In a twig template we would like to display a &lt;section&gt; such that all of it is clickable with different fields inside of it.

Current node--article.html.twig 

&lt;section&gt;
  &lt;a href={{ url }}&gt;{{ label }}&lt;/a&gt;
  &lt;div&gt;{{ content.body }}&lt;/div&gt;
  &lt;div&gt;{{ content.field_subtitle }}&lt;/div&gt;
  &lt;div&gt;{{ content.field_category }}&lt;/div&gt;
&lt;/section&gt;


Modified node--article.html.twig template to make entire &lt;section&gt; clickable (desired output). 

&lt;a href={{ url }} &gt;
  &lt;div&gt;{{ content.body }}&lt;/div&gt;
  &lt;div&gt;{{ content.field_subtitle }}&lt;/div&gt;
  &lt;div&gt;{{ content.field_category }}&lt;/div&gt;
&lt;/a&gt;


Is there another way I should be doing this?

I was looking for something similar to below. It would output what is under the Modified node--article.html.twig (above)

{{ link(label, url)|insert(content.body, content.field_subtitle, content.field_category) }}
I don't see anything for the insert tag in Twig or Drupal, but you can preprocess the url variable in mytheme.theme and pass it to the template, giving you what you want:

&lt;a href="{{ url }}" &gt;
  &lt;div&gt;{{ content.body }}&lt;/div&gt;
  &lt;div&gt;{{ content.field_subtitle }}&lt;/div&gt;
  &lt;div&gt;{{ content.field_category }}&lt;/div&gt;
&lt;/a&gt;


The url variable would be created in the preprocess function.

If its a standard link field, you could try:

$link = $node-&gt;get('field_link')-&gt;getValue();

if (!$external) {
  $variables['url'] = Url::fromUri($link['uri'])-&gt;toString();
}
else {
  $variables['url'] = $link['uri'];
}


Edit: totally forgot the line that checks if it is external.