kevin 3 роки тому
батько
коміт
acb8050fb4

+ 11 - 3
web/themes/custom/popsu_colloque/template/node/node--moments.html.twig

@@ -75,10 +75,18 @@
 #}
 <article class="row" id="moments">
   <div class="__wrapper col-sm-12 col-md-9">
-    <div class="__img-hero">
-    {{content.field_image}}
-    </div>
 
+    {% if content.field_embed['#items'] %}
+      <div class="__img-hero">
+        {{content.field_embed}}
+      </div>   
+      {% else %}
+      <div class="__img-hero">
+        {{content.field_image}}
+      </div>
+ 
+    {% endif %}
+  
     <div class="__title col-12 px-0">
       <h2>{{label}}</h2>
     </div>