# Wie ist If Abfrage Kurzbeschreibung zu stellen?

**URL:** <https://forum.shopware.com/t/wie-ist-if-abfrage-kurzbeschreibung-zu-stellen/49759>\
**Category:** Themes & Design\
**Created:** [29. November 2017 um 12:34 UTC](https://forum.shopware.com/t/wie-ist-if-abfrage-kurzbeschreibung-zu-stellen/49759 "2017-11-29T12:34:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yvi\_sw](https://avatars.discourse-cdn.com/v4/letter/y/65b543/32.png) [@yvi\_sw](https://forum.shopware.com/u/yvi_sw)\
**Post date:** [29. November 2017 um 12:34 UTC](https://forum.shopware.com/t/wie-ist-if-abfrage-kurzbeschreibung-zu-stellen/49759/1 "2017-11-29T12:34:34Z")

</div>

Ich habe unter&nbsp;\themes\Frontend\meintheme\frontend\listing\product-box&nbsp; die Datei ‚box-basic.tpl‘ wie folgt editiert:

{\* Product description \*}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {block name=‚frontend\_listing\_box\_article\_description‘}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{if !empty{$sArticle.description}}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {$sArticle.description\_long|strip\_tags|truncate:240}  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{else}  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{$sArticle.description|strip\_tags|truncate:240}  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{/if}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {/block}

Mein Ziel ist es die Kurzbeschreibung (meta description im Backende)&nbsp;im Listing anzuzeigen, wenn eine vorhanden ist. Ansonsten soll die beschnittene Beschreibung (Description long)angezeigt werden. Leider funtioniert das nicht. Was ist an meinem Syntax falsch?

Gruß

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [29. November 2017 um 12:50 UTC](https://forum.shopware.com/t/wie-ist-if-abfrage-kurzbeschreibung-zu-stellen/49759/2 "2017-11-29T12:50:05Z")

</div>

Versuch mal&nbsp;

```
{if $sArticle.description != ""}
{$sArticle.description_long|strip_tags|truncate:240}
{else}
{$sArticle.description|strip_tags|truncate:240}
{/if}

```

Aber ein Leerzeichen in description zählt dann auch bereits - ggf. erst noch strip im if einbauen.
