# Numerische Werte im Template abfragen

**URL:** <https://forum.shopware.com/t/numerische-werte-im-template-abfragen/26361>\
**Category:** Shopware 3.5\
**Tags:** themes--design\
**Created:** [20. April 2015 um 12:18 UTC](https://forum.shopware.com/t/numerische-werte-im-template-abfragen/26361 "2015-04-20T12:18:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tennisfreund](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@tennisfreund](https://forum.shopware.com/u/tennisfreund)\
**Post date:** [20. April 2015 um 12:18 UTC](https://forum.shopware.com/t/numerische-werte-im-template-abfragen/26361/1 "2015-04-20T12:18:13Z")

</div>

Hallo, kann mir jemand erklären, warum beides nicht funktioniert? `{if $sCategoryInfo.parentId == "11"}{do...}{/if} {if $sCategoryInfo.parentId == 11}{do...}{/if}` Danke!

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [20. April 2015 um 12:33 UTC](https://forum.shopware.com/t/numerische-werte-im-template-abfragen/26361/2 "2015-04-20T12:33:32Z")

</div>

```auto
{if $sCategoryInfo.parentId == 11} Ich habe die Parent ID 11. {else} Ich habe die ID 11 nicht. {/if}
```

---

<div class="post-metadata">

**Author:** ![Creatixx](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Creatixx](https://forum.shopware.com/u/Creatixx)\
**Post date:** [20. April 2015 um 12:35 UTC](https://forum.shopware.com/t/numerische-werte-im-template-abfragen/26361/3 "2015-04-20T12:35:53Z")

</div>

> [@tennisfreund](#):
>
> Hallo, kann mir jemand erklären, warum beides nicht funktioniert? `{if $sCategoryInfo.parentId == "11"}{do...}{/if} {if $sCategoryInfo.parentId == 11}{do...}{/if}` Danke!

---

<div class="post-metadata">

**Author:** ![tennisfreund](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@tennisfreund](https://forum.shopware.com/u/tennisfreund)\
**Post date:** [20. April 2015 um 13:02 UTC](https://forum.shopware.com/t/numerische-werte-im-template-abfragen/26361/4 "2015-04-20T13:02:35Z")

</div>

Achso ja da kommt ein include rein, daher die Klammern! Es klappt dann jetzt so: `{if $sCategoryInfo.parentId == 11}{include file='frontend/listing/info.tpl'}{/if}` Warum es vorher, bei exakt gleicher Schreibweise, nicht geklappt hat, weiss mal wieder nur der Script-Häuptling persönlich!! Danke!
