Hide a region with empty view in it I have a region page_intro where I display a view, with some CSS on it. When the view is empty (return no result), the region is still displayed (All html code before and after {{ page.page_intro }}). Is there a way to compltetly remove it when the view is empty ?

template :

{% if page.page_intro %}
    {# #page-intro #}
    &lt;div id="page-intro" class="clearfix"&gt;
        &lt;div class="container-fluid"&gt;
            &lt;div class="row"&gt;
                {# #page-intro-inside #}
                &lt;div id="page-intro-inside" class="col-md-10 col-md-offset-1 clearfix"&gt;
                    {{ page.page_intro }}
                &lt;/div&gt;
                {# EOF: #page-intro-inside #}
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    {# EOF: #page-intro #}
{% endif %}


I'm on Drupal 8.2.0 version.
I would suggest you use the views template for your view (views-view--page-intro.html.twig, and put the wrapping markup in there, rather than in the page template.

{% if rows %}
    &lt;div id="page-intro" class="clearfix"&gt;
        &lt;div class="container-fluid"&gt;
            &lt;div class="row"&gt;
                &lt;div id="page-intro-inside" class="col-md-10 col-md-offset-1 clearfix"&gt;
                    {{ rows }}
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
  {% endif %}


turn on twig debugging to see the template suggestions in your page markup.  this will be the default.services.yml file in your config directory where you have settings.php

 twig.config:
    debug: true