Skip to main content
deleted 230 characters in body
Source Link
No Sssweat
  • 31.8k
  • 14
  • 57
  • 92

Create node--articles.html.twig and place it in your theme's templates folder.

{{ content|without('field_name', 'field_name_other') }} {% if content.field_name.0 is empty %} <div class="something">{{ content.field_name_other }}</div> {% else %} <div class="something">{{ content.field_name }}</div> {% endif %} 

Note:

Create node--articles.html.twig and place it in your theme's templates folder.

{{ content|without('field_name', 'field_name_other') }} {% if content.field_name.0 is empty %} <div class="something">{{ content.field_name_other }}</div> {% else %} <div class="something">{{ content.field_name }}</div> {% endif %} 

Note:

Create node--articles.html.twig and place it in your theme's templates folder.

{% if content.field_name.0 is empty %} <div class="something">{{ content.field_name_other }}</div> {% else %} <div class="something">{{ content.field_name }}</div> {% endif %} 

Note:

added 67 characters in body
Source Link
No Sssweat
  • 31.8k
  • 14
  • 57
  • 92

Create node--articles.html.twig and place it in your theme's templates folder.

{{ content|without('field_name', 'field_name_other') }} {% if content.field_name.0 is empty %} <div class="something">{{ content.field_name_other }}</div> {% else %} <div class="something">{{ content.field_name }}</div> {% endif %} 

Note:Note:

content.field_name.0 gets the raw value

Create node--articles.html.twig and place it in your theme's templates folder.

{% if content.field_name.0 is empty %} <div class="something">{{ content.field_name_other }}</div> {% else %} <div class="something">{{ content.field_name }}</div> {% endif %} 

Note:

content.field_name.0 gets the raw value

Create node--articles.html.twig and place it in your theme's templates folder.

{{ content|without('field_name', 'field_name_other') }} {% if content.field_name.0 is empty %} <div class="something">{{ content.field_name_other }}</div> {% else %} <div class="something">{{ content.field_name }}</div> {% endif %} 

Note:

Source Link
No Sssweat
  • 31.8k
  • 14
  • 57
  • 92

Create node--articles.html.twig and place it in your theme's templates folder.

{% if content.field_name.0 is empty %} <div class="something">{{ content.field_name_other }}</div> {% else %} <div class="something">{{ content.field_name }}</div> {% endif %} 

Note:

content.field_name.0 gets the raw value