# if Controller: Ich würde in Shopware 6 gerne die Beadcrumb auf der Startseite ausblenden

**URL:** <https://forum.shopware.com/t/if-controller-ich-wurde-in-shopware-6-gerne-die-beadcrumb-auf-der-startseite-ausblenden/68171>\
**Category:** Programmierung\
**Created:** [6. Juli 2020 um 17:46 UTC](https://forum.shopware.com/t/if-controller-ich-wurde-in-shopware-6-gerne-die-beadcrumb-auf-der-startseite-ausblenden/68171 "2020-07-06T17:46:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wilondo](https://avatars.discourse-cdn.com/v4/letter/w/b38774/32.png) [@Wilondo](https://forum.shopware.com/u/Wilondo)\
**Post date:** [6. Juli 2020 um 17:46 UTC](https://forum.shopware.com/t/if-controller-ich-wurde-in-shopware-6-gerne-die-beadcrumb-auf-der-startseite-ausblenden/68171/1 "2020-07-06T17:46:11Z")

</div>

Hallo,

ich würde gerne die Breadcrumb (nur) auf der Startseite ausblenden in Shopware 6.  
Wie ich es verstehe muss ich dazu eine if Abfrage einbauen. Ich bin mir aber nicht  
sicher, wie und welchen Controller ich dazu ansprechen muss. Ich habe bisher in der&nbsp;  
index.html.twig den Block für die Breadcrumb in einen if-Container gepackt.&nbsp;  
Funktioniert aber nicht. Kann mir jemand helfen wie ich das machen muss?

&nbsp; **&nbsp; {% if Controller|lower != „index“ %}**  
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {# @deprecated tag:v6.4.0 class `cms-breadcrump` use `cms-breadcrumb` instead #}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {% block cms\_breadcrumb %}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {% sw\_include ‚@Storefront/storefront/component/listing/breadcrumb.html.twig‘ with {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; navigationTree: page.header.navigation.tree,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; category: page.header.navigation.active  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } only %}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {% endblock %}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; **&nbsp;{% endif %}**

lg

Wilo

---

<div class="post-metadata">

**Author:** ![dweseom](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@dweseom](https://forum.shopware.com/u/dweseom)\
**Post date:** [7. Juli 2020 um 11:15 UTC](https://forum.shopware.com/t/if-controller-ich-wurde-in-shopware-6-gerne-die-beadcrumb-auf-der-startseite-ausblenden/68171/2 "2020-07-07T11:15:58Z")

</div>

Hi,

gib doch im Twig einmal {{ dump() }} aus und schaue dir die Variablen an - vielleicht kannst du darüber die Startseite identifizieren?

---

<div class="post-metadata">

**Author:** ![Wilondo](https://avatars.discourse-cdn.com/v4/letter/w/b38774/32.png) [@Wilondo](https://forum.shopware.com/u/Wilondo)\
**Post date:** [7. Juli 2020 um 12:01 UTC](https://forum.shopware.com/t/if-controller-ich-wurde-in-shopware-6-gerne-die-beadcrumb-auf-der-startseite-ausblenden/68171/3 "2020-07-07T12:01:15Z")

</div>

> [@dweseom schrieb:](https://forum.shopware.com/profile/27479/dweseom "dweseom")
> 
> Hi,
> 
> gib doch im Twig einmal {{ dump() }} aus und schaue dir die Variablen an - vielleicht kannst du darüber die Startseite identifizieren?

Bei mir kommt dann dieses Array:

```
array:10 [▼
  "context" => Shopware\Core\System\SalesChannel\SalesChannelContext {#10021 ▶}
  "page" => Shopware\Storefront\Page\Navigation\NavigationPage {#16919 ▶}
  "hrefLang" => Shopware\Core\Content\Seo\Hreflang\HreflangCollection {#16713 ▶}
  "shopware" => array:5 [▶]
  "controllerName" => "Navigation"
  "controllerAction" => "home"
  "activeRoute" => "frontend.home.page"
  "formViolations" => null
  "app" => Symfony\Bridge\Twig\AppVariable {#391 ▶}
  "isHMRMode" => null
]

```

&nbsp;Ich könnte also ggf. „controllerAction“ oder „activeRoute“ nehmen, weiss aber nicht wie.&nbsp;  
Das hier und paar andere Varianten klappen&nbsp;irgendwie nicht, ich weiss nicht, wie ich das richtig schreibe.

```
{% sw_extends '@Storefront/storefront/base.html.twig' %}

{% block base_main_inner %}
    
        {% block page_content %}
        
        {{ dump() }}
   
      {% if activeRoute != "frontend.home.page" %}
        
 {# @deprecated tag:v6.4.0 class `cms-breadcrump` use `cms-breadcrumb` instead #}
            
            
                {% block cms_breadcrumb %}
                    {% sw_include '@Storefront/storefront/component/listing/breadcrumb.html.twig' with {
                        navigationTree: page.header.navigation.tree,
                        category: page.header.navigation.active
                    } only %}
                {% endblock %}
            
            
            {% endif %}
            
            
                {% block page_content_blocks %}
                    {% sw_include "@Storefront/storefront/page/content/detail.html.twig" with {'cmsPage': page.cmsPage} %}
                {% endblock %}
            
        {% endblock %}
    
{% endblock %}

```

lg

Wilo

&nbsp;

---

<div class="post-metadata">

**Author:** ![finsti](https://avatars.discourse-cdn.com/v4/letter/f/ad7895/32.png) [@finsti](https://forum.shopware.com/u/finsti)\
**Post date:** [10. Juli 2020 um 18:51 UTC](https://forum.shopware.com/t/if-controller-ich-wurde-in-shopware-6-gerne-die-beadcrumb-auf-der-startseite-ausblenden/68171/4 "2020-07-10T18:51:27Z")

</div>

Hallo Wilo,

ich hatte das selbe Vorhaben (Breadcrumb nur auf der Startseite ausblenden).  
Mit der folgenden if Abfrage habe ich es gelöst:

```
{% if controllerAction != ('home') %}

```

LG  
finsti

---

<div class="post-metadata">

**Author:** ![Wilondo](https://avatars.discourse-cdn.com/v4/letter/w/b38774/32.png) [@Wilondo](https://forum.shopware.com/u/Wilondo)\
**Post date:** [12. Juli 2020 um 13:59 UTC](https://forum.shopware.com/t/if-controller-ich-wurde-in-shopware-6-gerne-die-beadcrumb-auf-der-startseite-ausblenden/68171/5 "2020-07-12T13:59:13Z")

</div>

> [@finsti schrieb:](https://forum.shopware.com/profile/35753/finsti "finsti")
> 
> Hallo Wilo,
> 
> ich hatte das selbe Vorhaben (Breadcrumb nur auf der Startseite ausblenden).  
> Mit der folgenden if Abfrage habe ich es gelöst:
> 
> {% if controllerAction != (‚home‘) %}
> 
> LG  
> finsti

SUPERCOOL, vielen DANK.

&nbsp;
