- Issue created by @thomas.frobieter
- 🇩🇪Germany Anybody Porta Westfalica
Nice idea, I added some more details to the issue summary. +1
If a view added through an extra field is empty, all the wrappers are still printed out and its kind of hard to write a proper empty check for this.
Example:
{% if product.extra_field_foo_view %}
{% set view_name = product.extra_field_foo_view.content['#name'] %}
{% set view_display_name = product.extra_field_foo_view.content['#display'] %}
{% if drupal_view_result(view_name,view_display_name)|length %}
<div class="product__x-sells container container--extended">
{{ product.extra_field_foo_view }}
</div>
{% endif %}
{% endif %}
Would be very nice if this where just something like:
{% if product.extra_field_foo_view %}
<div class="product__x-sells container container--extended">
{{ product.extra_field_foo_view }}
</div>
{% endif %}
Active
2.0
Code
Nice idea, I added some more details to the issue summary. +1