Skip to content

Commit 2ac763c

Browse files
committed
Remove deprecated spaceless filter
1 parent 6e7ccae commit 2ac763c

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

docs/notification-center-pro/custom-tokens/_index.de.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,28 +73,17 @@ Gehen wir kurz durch diesen Screenshot:
7373
Hier ist der Twig-Code, der im Screenshot zu sehen ist und zum besseren Verständnis mit Kommentaren versehen ist:
7474

7575
```twig
76-
{#
77-
Wir wollen sicherstellen, dass es keinen Leerraum gibt, sondern nur unser
78-
Token-Wert ausgegeben wird. Du kannst die Behandlung von Leerzeichen in Twig
79-
steuern, um genau das zu erreichen, was du möchtest. Siehe
80-
https://twig.symfony.com/doc/3.x/templates.html#templates-whitespace-control
81-
für weitere Informationen.
82-
#}
83-
{% apply spaceless %}
84-
8576
{#
8677
Zunächst einmal ist es immer wichtig, das gesamte Template in eine if-Anweisung
8778
zu verpacken, um zu prüfen, ob überhaupt ein ##form_colors##-Token angegeben wurde.
8879
Der einfachste Weg ist die Verwendung der Methode "has()" auf unseren rawTokens.
8980
#}
9081
{% if rawTokens.has('form_colors') %}
91-
9282
{#
9383
Hier ist ein Beispiel, wie du eine Zeichenkette mit ", " trennen kannst, wenn
9484
sie das Format "green, red, blue" hat.
9585
#}
9686
{% set colors = parsedTokens.form_colors|split(', ') %}
97-
9887
{#
9988
Wir haben nun in dieser Vorlage eine Variable mit dem Namen "colors" definiert,
10089
die nun ein Array enthält. Wir können also unseren gewünschten Token-Inhalt erreichen,
@@ -104,9 +93,7 @@ Hier ist der Twig-Code, der im Screenshot zu sehen ist und zum besseren Verstän
10493
lediglich zur Veranschaulichung, wie komplexere Templates geschrieben werden könnten.
10594
#}
10695
{% if 'green' in colors %}yes{% else %}no{% endif %}
107-
10896
{% endif %}
109-
{% endapply %}
11097
```
11198

11299
Das war's, du hast jetzt ein Token `is_color_green`, das entweder `yes` oder `no` enthält. Herzlichen Glückwunsch! 🎉

docs/notification-center-pro/custom-tokens/_index.en.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,28 +79,18 @@ Let's quickly go through the settings of the screenshot here.
7979
Here is the Twig code visible in the screenshot and annotated with comments for you to understand:
8080

8181
```twig
82-
{#
83-
We want to make sure, there is no white space but just our token value.
84-
You can control the whitespace handling in Twig to achieve exactly what you want.
85-
See https://twig.symfony.com/doc/3.x/templates.html#templates-whitespace-control
86-
for more information.
87-
#}
88-
{% apply spaceless %}
89-
9082
{#
9183
First of all, it's always important to wrap the whole template into an
9284
if statement in order to check whether
9385
there even was a ##form_colors## token provided.
9486
The easiest way is to use the "has()" method on our rawTokens.
9587
#}
9688
{% if rawTokens.has('form_colors') %}
97-
9889
{#
9990
Here is an example how you could split a string
10091
by ", " if it was in the format of "green, red, blue".
10192
#}
10293
{% set colors = parsedTokens.form_colors|split(', ') %}
103-
10494
{#
10595
We now defined a variable in this template named "colors" which
10696
now contains an array. So we can achieve our desired token content
@@ -110,9 +100,7 @@ Here is the Twig code visible in the screenshot and annotated with comments for
110100
used here to illustrate how more complex templates could be written.
111101
#}
112102
{% if 'green' in colors %}yes{% else %}no{% endif %}
113-
114103
{% endif %}
115-
{% endapply %}
116104
```
117105

118106
That's it, you now have a token `is_color_green` which contains either `yes` or `no`. Congratulations! 🎉

0 commit comments

Comments
 (0)