Skip to content

Commit

Permalink
Clarified format of conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed May 2, 2024
1 parent b0ead4a commit 48f68af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/notification-center-pro/message-conditions/_index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Nun können wir mit `##form_urgent## === 'yes'` eine gesamte Nachricht nur dann

![Screenshot der Bedingung im Backend]({{% asset "/notification-center-pro/images/screenshot_message_condition.png" %}}?classes=shadow)

{{% notice idea %}}
Technisch gesehen brauchst du die `##` nicht, wenn du Bedingungen definierst. Sie werden entfernt, bevor sie ausgewertet werden. Ihre Verwendung
dient nur zu deiner eigenen Benutzerfreundlichkeit, da sie die automatische Vervollständigung aktivieren. Du kannst aber genauso gut direkt `form_urgent === 'yes'` schreiben. Beide
Varianten werden funktionieren. Bedingungen innerhalb des E-Mail-Textes z.B. werden ja auch ohne die `##` geschrieben (z.B. `{if form_urgent === 'yes'}`).
{{% /notice %}}

{{% notice tip %}}
Diese Funktion ist besonders mächtig im Zusammenspiel mit [benutzerdefinierten Tokens]({{< ref "/custom-tokens" >}})!
{{% /notice %}}
6 changes: 6 additions & 0 deletions docs/notification-center-pro/message-conditions/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Now we can use `##form_urgent## === 'yes'` to send an entire message only if the

![Screenshot of the condition in the back end]({{% asset "/notification-center-pro/images/screenshot_message_condition.png" %}}?classes=shadow)

{{% notice idea %}}
Technically speaking, you don't need the `##` when defining conditions. They are removed before being evaluated. Using them
is only for your own usability as they trigger autocompletion. But you might as well write `form_urgent === 'yes'` directly. Both
variants will work. Conditions within the e-mail text, for example, are also written without the `##` (e.g. `{if form_urgent === 'yes'}`).
{{% /notice %}}

{{% notice tip %}}
This function is particularly powerful in combination with [custom tokens]({{< ref "/custom-tokens" >}})!
{{% /notice %}}

0 comments on commit 48f68af

Please sign in to comment.