{% if (Mode == 'search_entry_box' or Mode == 'search_entry_box_show_always') and (Document_Search_Results or Document_Search_No_Results) %}
    {% set Column = Column + 1 %}
    <div id="{{Container_Id}}_document_results" class="column_{{Column}} column column_docs">
{% endif %}

{% if (Mode == 'search_entry_box' or Mode == 'search_entry_box_show_always') and Document_Column_Heading_Text and not Document_Search_No_Results %}
    <span class="column_title">{{Document_Column_Heading_Text|e}}</span>
{% endif %}

{% if Document_Search_Results %}
    {% include advancedSearchCoreFrameworksPath ~ 'includes/populate_results_loop.twig.html' with {'Type': Document_Search_Results} %}
    
    {% if (Mode == 'search_entry_box' or Mode == 'search_entry_box_show_always') %}
    	{% if Document_And_X_More_Results_Phrase %}
    		<p class="more_results">{{Document_And_X_More_Results_Phrase}}</p>
    	{% endif %}
    {% endif %}
{% endif %}

{% if Document_Search_No_Results %}
    <div class="search_no_results">
        <p>{{Document_No_Results_Text|e}}</p>
    </div>
{% endif %}

{% if (Mode == 'search_entry_box' or Mode == 'search_entry_box_show_always') and (Document_Search_Results or Document_Search_No_Results) %}
    </div>
{% endif %}