Skip to content

Commit

Permalink
fix: mixed search with products
Browse files Browse the repository at this point in the history
  • Loading branch information
7underlines committed Jan 1, 2025
1 parent 85caf72 commit 7ed3cc0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
{% if blogResult != "" %}
<div class="nav flex-md-column flex-row nav-pills justify-content-around" id="v-pills-tab" role="tablist" aria-orientation="vertical">
{% block layout_search_suggest_results_tab_pane_product %}
<a class="nav-link flex-fill text-md-left text-center {% if productTotal >= blogTotal %}show active{% endif %}" id="v-pills-product-tab" data-toggle="pill" href="#v-pills-product" role="tab" aria-controls="v-pills-product" aria-selected="true">
<a class="nav-link flex-fill text-md-left text-center {% if productTotal > 0 %}show active{% endif %}" id="v-pills-product-tab" data-toggle="pill" href="#v-pills-product" role="tab" aria-controls="v-pills-product" aria-selected="true">
{{ 'werkl-blog.search.tabs.product'|trans|sw_sanitize }} <span class="badge badge-light">{{ productTotal }}</span>
</a>
{% endblock %}

{% block layout_search_suggest_results_tab_pane_blog %}
<a class="nav-link flex-fill text-md-left text-center {% if blogTotal > productTotal %}active{% endif %}" id="v-pills-blog-tab" data-toggle="pill" href="#v-pills-blog" role="tab" aria-controls="v-pills-blog" aria-selected="false">
<a class="nav-link flex-fill text-md-left text-center {% if blogTotal > 0 %}active{% endif %}" id="v-pills-blog-tab" data-toggle="pill" href="#v-pills-blog" role="tab" aria-controls="v-pills-blog" aria-selected="false">
{{ 'werkl-blog.search.tabs.blog'|trans|sw_sanitize }} <span class="badge badge-light">{{ blogTotal }}</span>
</a>
{% endblock %}
Expand All @@ -31,7 +31,7 @@
</div>
<div class="{% if blogResult != "" %}col-md-9{% else %}col-md-12{% endif %} col-12">
<div class="tab-content" id="v-pills-tabContent">
<div class="tab-pane fade {% if productTotal >= blogTotal %}show active{% endif %}" id="v-pills-product" role="tabpanel" aria-labelledby="v-pills-product-tab">
<div class="tab-pane fade {% if productTotal > 0 %}show active{% endif %}" id="v-pills-product" role="tabpanel" aria-labelledby="v-pills-product-tab">
{{ parent() }}

{% block layout_search_suggest_result_blog_total %}
Expand Down Expand Up @@ -69,7 +69,7 @@
{% endblock %}
</div>
{% block layout_search_suggest_results_tab_pane_content_blog %}
<div class="tab-pane fade {% if blogTotal > productTotal %}show active{% endif %}" id="v-pills-blog" role="tabpanel" aria-labelledby="v-pills-blog-tab">
<div class="tab-pane fade {% if blogTotal > 0 %}show active{% endif %}" id="v-pills-blog" role="tabpanel" aria-labelledby="v-pills-blog-tab">
{% sw_include "@Storefront/storefront/layout/header/blog-suggest-tab-content.html.twig" with {
blogResult: blogResult,
searchTerm: page.searchTerm
Expand Down

0 comments on commit 7ed3cc0

Please sign in to comment.