# Zeilenumbruch in Artikel Listenansicht wird ignoriert

**URL:** <https://forum.shopware.com/t/zeilenumbruch-in-artikel-listenansicht-wird-ignoriert/48092>\
**Category:** Themes & Design\
**Created:** [6. September 2017 um 12:31 UTC](https://forum.shopware.com/t/zeilenumbruch-in-artikel-listenansicht-wird-ignoriert/48092 "2017-09-06T12:31:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjaeger](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@pjaeger](https://forum.shopware.com/u/pjaeger)\
**Post date:** [6. September 2017 um 12:31 UTC](https://forum.shopware.com/t/zeilenumbruch-in-artikel-listenansicht-wird-ignoriert/48092/1 "2017-09-06T12:31:49Z")

</div>

Hallo,

wir finden die Ansicht der Kurzbeschreibung in der Artikel Listenansicht nicht gut gelöst.

Es ist für uns besser wenn der Text auch formatiert, also zb mit Zeilenumbruch, angezeigt wird.

Aktuell wird \< /br\> ignoriert.

&nbsp;

In Shopware 4 hat man diesen Code:

```
 {$sArticle.description\_long|replace:"
":"\n"|strip\_tags|truncate:$size|nl2br}

```

in der article\_box.tpl ersetzen können. In Shopware 5 fehlt mir diese Möglichkeit.

&nbsp;

Hat hier jemand eine Idee?&nbsp;

Genutzt wird das&nbsp;Rnmshopware Theme (responsive).

&nbsp;

---

<div class="post-metadata">

**Author:** ![pjaeger](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@pjaeger](https://forum.shopware.com/u/pjaeger)\
**Post date:** [6. September 2017 um 18:08 UTC](https://forum.shopware.com/t/zeilenumbruch-in-artikel-listenansicht-wird-ignoriert/48092/2 "2017-09-06T18:08:42Z")

</div>

Hat wirklich niemand eine Idee?&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![pjaeger](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@pjaeger](https://forum.shopware.com/u/pjaeger)\
**Post date:** [6. September 2017 um 20:23 UTC](https://forum.shopware.com/t/zeilenumbruch-in-artikel-listenansicht-wird-ignoriert/48092/3 "2017-09-06T20:23:53Z")

</div>

Ich bin der Sache schon selber etwas näher gekommen.

&nbsp;

Wie kann man diesen Code&nbsp;

\<?php   
 &nbsp; &nbsp; public function sOptimizeText($text)&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $text = html\_entity\_decode($text, ENT\_NOQUOTES, 'UTF-8');&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $text = preg\_replace('@]\*?\\>.\*?\\1\\>@si', '', $text);&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $text = preg\_replace('!]\*?\\>!u', ' ', $text);&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $text = preg\_replace('/\s\s+/u', ' ', $text);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $text = trim($text);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return $text;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;&nbsp; &nbsp; so bearbeiten dass als Zeilenumbruch angezeigt werden. Alles andere kann eigentlich gestript werden. replace:" ":"\n"| funktioniert in der box-basic.tpl nicht.
