# TWIG: String oder nicht String - was läuft falsch bei category\_url()?

**URL:** <https://forum.shopware.com/t/twig-string-oder-nicht-string-was-laeuft-falsch-bei-category-url/99243>\
**Category:** Programmierung\
**Tags:** programming, templates--design\
**Created:** [6. April 2023 um 10:37 UTC](https://forum.shopware.com/t/twig-string-oder-nicht-string-was-laeuft-falsch-bei-category-url/99243 "2023-04-06T10:37:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![AlexGalax](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/alexgalax/32/9925_2.png) [@AlexGalax](https://forum.shopware.com/u/AlexGalax)\
**Post date:** [6. April 2023 um 11:32 UTC](https://forum.shopware.com/t/twig-string-oder-nicht-string-was-laeuft-falsch-bei-category-url/99243/2 "2023-04-06T11:32:53Z")

</div>

Das ist nicht „irgendeine schräge Ersetzung“, sondern:

> [@lady\_beetle Falsche URL bei Überage von Twig an JS mit seoUrl](https://forum.shopware.com/t/falsche-url-bei-ueberage-von-twig-an-js-mit-seourl/98995/9):
>
> Das liegt daran, weil die SEO Urls im Template erst ersetzt werden, nachdem das gesamte Template gerendert wurde. Sonst hätte man viele Datenbankabfragen bei jedem Produkt. json\_encode() maskiert aber die Slashes und deshalb kann die RAW Url nicht mehr im Template gefunden und ersetzt werden.

---

_[View the full topic](https://forum.shopware.com/t/twig-string-oder-nicht-string-was-laeuft-falsch-bei-category-url/99243)._
