# Smarty innerhalb eines Textbausteins

**URL:** <https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981>\
**Category:** Themes & Design\
**Created:** [6. Juli 2016 um 15:13 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981 "2016-07-06T15:13:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![iLuHa](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/iluha/32/8191_2.png) [@iLuHa](https://forum.shopware.com/u/iLuHa)\
**Post date:** [6. Juli 2016 um 15:13 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/1 "2016-07-06T15:13:01Z")

</div>

Hallo zusammen,

ist es möglich Smarty Code innerhalb eines Textbausteins zu verwenden?

Sowas wie:

```
{s name="textbaustein_xy"}{$irgendwas|@count}{/s}

```

Denn ich habe das Problem dass in meiner &nbsp;s\_core\_snippet Tabelle mehrere Textbausteine mit der ShopID 111 und localID 0 angelegt werden.  
Auch nachdem ich diese manuell entfernt habe und neu generieren lassen habe, tauchten diese wieder mit der gleichen ShopID und localID auf.  
Somit sind die benötigten Textbausteine natürlich auch nicht im Backend sichtbar.

Hat jemand eine Idee woran das liegen könnte?

Falsch verwendete Textbausteine vielleicht?

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [6. Juli 2016 um 15:17 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/2 "2016-07-06T15:17:21Z")

</div>

Hi,

kurz und knapp: Ja&nbsp; ![Smile](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/bac5f5766b6a20565a8fb995345b4e41d24daac0.png "Smile")

wird auch im Core so gemacht, z.B.:&nbsp;[shopware/fuzzy.ini at 5.2 · shopware/shopware · GitHub](https://github.com/shopware/shopware/blob/5.2/snippets/frontend/search/fuzzy.ini)

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<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:** [6. Juli 2016 um 15:23 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/3 "2016-07-06T15:23:00Z")

</div>

> ist es möglich Smarty Code innerhalb eines Textbausteins zu verwenden?

Ja, ist möglich.

> &nbsp;Denn ich habe das Problem dass in meiner &nbsp;s\_core\_snippet Tabelle mehrere Textbausteine mit der ShopID 111 und localID 0 angelegt werden.

Den Fehler kenne / habe ich auch, wenn ich noch nicht erzeugte snippets&nbsp;über den Snippet Manager lesen möchte. Eine Lösung habe ich bisher keine gefunden ☹ Auch der Shopware Support hat mir bisher nur empfohlen: direkt via plain sql erzeugen.

Viele Grüße

---

<div class="post-metadata">

**Author:** ![iLuHa](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/iluha/32/8191_2.png) [@iLuHa](https://forum.shopware.com/u/iLuHa)\
**Post date:** [6. Juli 2016 um 15:26 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/4 "2016-07-06T15:26:09Z")

</div>

Ich habe einige der Snippets nun manuell über das Backend angelegt.

Aber selbst die, die ich angelegt habe, wurden erneut mit ShopID 111 und localID 0 erneut erzeugt o.O

---

<div class="post-metadata">

**Author:** ![GabrielBV](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@GabrielBV](https://forum.shopware.com/u/GabrielBV)\
**Post date:** [20. September 2018 um 10:45 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/5 "2018-09-20T10:45:18Z")

</div>

Gibt es auch die Möglichkeit im Backend im Feld des Textbausteins smarty zu nutzen?

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [21. September 2018 um 07:27 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/6 "2018-09-21T07:27:41Z")

</div>

Hallo Gabriel,

ja das sollte auch möglich sein.&nbsp;

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![GabrielBV](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@GabrielBV](https://forum.shopware.com/u/GabrielBV)\
**Post date:** [21. September 2018 um 08:04 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/7 "2018-09-21T08:04:43Z")

</div>

Es wird allerdings im frontend dann nur der Smartybefehl ausgegeben…

---

<div class="post-metadata">

**Author:** ![GabrielBV](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@GabrielBV](https://forum.shopware.com/u/GabrielBV)\
**Post date:** [24. September 2018 um 08:31 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/8 "2018-09-24T08:31:57Z")

</div>

![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/4/45d4b7a0216db1e6870fe9a07420d57a5ea5d127.jpeg)

Eine Lösung wäre wirklich hilfreich.

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [24. September 2018 um 08:35 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/9 "2018-09-24T08:35:10Z")

</div>

Naja, das geht halt nicht in jedem Textbaustein.

Wahrscheinlich funktioniert es gerade da nicht. Da müsstest du dann das Theme anpassen.

---

<div class="post-metadata">

**Author:** ![GabrielBV](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@GabrielBV](https://forum.shopware.com/u/GabrielBV)\
**Post date:** [24. September 2018 um 08:47 UTC](https://forum.shopware.com/t/smarty-innerhalb-eines-textbausteins/37981/10 "2018-09-24T08:47:50Z")

</div>

> [@Moritz Naczenski schrieb:](https://forum.shopware.com/profile/14574/Moritz%20Naczenski "Moritz%20Naczenski")
> 
> Naja, das geht halt nicht in jedem Textbaustein.
> 
> Wahrscheinlich funktioniert es gerade da nicht. Da müsstest du dann das Theme anpassen.

Hm Ok, nicht wirklich gut nachzuvollziehen wo es nun geht und wo nicht. Wäre natürlich toll wenn entweder geht oder nicht.
