# MenuLeftInformation - Text je nach Kategorie anders?

**URL:** https://forum.shopware.com/t/menuleftinformation-text-je-nach-kategorie-anders/23794
**Category:** Shopware 3.5
**Tags:** themes--design
**Created:** [25. November 2014 um 16:39 UTC](https://forum.shopware.com/t/menuleftinformation-text-je-nach-kategorie-anders/23794 "2014-11-25T16:39:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![crobon](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@crobon](https://forum.shopware.com/u/crobon)
#### Post date: [25. November 2014 um 16:39 UTC](https://forum.shopware.com/t/menuleftinformation-text-je-nach-kategorie-anders/23794/1 "2014-11-25T16:39:24Z")

</div>

Hallo zusammen, aktuell habe ich im linken Menü folgenden code in der menu\_left.tpl eingefügt: [code]{if $sMenu.gLeft}

{s name=„MenuLeftInformation“}Informationen{/s}

{/if}[/code] Soweit so gut, der Textbaustein wird auch wie gewollt ausgegeben. Nun hätte ich das aber gerne das er je nach Kategorie einen anderen Text benutzt. Irgendwie also [code]{if $sCategory.id eq 5}

{s name=„MenuLeftInformation1“}Informationen1{/s}

{if $sCategory.id eq 6}

{s name=„MenuLeftInformation2“}Informationen2{/s}

{else}

{s name=„MenuLeftInformation3“}Informationen3{/s}

{/if} {/if}[/code] Würde das so funktionieren? syntax so richtig??

---

<div class="post-metadata">

### Author: ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)
#### Post date: [25. November 2014 um 17:16 UTC](https://forum.shopware.com/t/menuleftinformation-text-je-nach-kategorie-anders/23794/2 "2014-11-25T17:16:25Z")

</div>

Hast du es bereits ausprobiert? Verhalten sich die Textbausteine wie gewünscht? Gibt es eine Fehlermeldung? Viele Grüße

---

<div class="post-metadata">

### Author: ![crobon](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@crobon](https://forum.shopware.com/u/crobon)
#### Post date: [25. November 2014 um 17:28 UTC](https://forum.shopware.com/t/menuleftinformation-text-je-nach-kategorie-anders/23794/3 "2014-11-25T17:28:44Z")

</div>

Vielleicht erstmal selber ausprobieren bevor man fragt 🙂 Mit `{if $sCategory.id eq 5}` ging es leider nicht, scheinbar hat er darauf keine Zugriff? Lösung: [code]{if $sCategoryCurrent eq 5}

{s name=„MenuLeftInformation\_ID5“}{/s}

{/if} {if $sCategoryCurrent eq 6}

{s name=„MenuLeftInformation\_ID6“}{/s}

{/if} {if $sCategoryCurrent eq 7}

{s name=„MenuLeftInformation\_ID7“}{/s}

{/if}[/code] So funktionierts bei mir. Ich hoffe das ist auch Technisch einwandfrei. 🙂
