Skip to content

Commit

Permalink
Merge pull request #8310 from blueo/patch-1
Browse files Browse the repository at this point in the history
Add detail to negation docs
  • Loading branch information
robbieaverill committed Aug 15, 2018
2 parents 3b06385 + 25c8470 commit 7daea92
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/en/02_Developer_Guides/01_Templates/01_Syntax.md
Expand Up @@ -178,14 +178,25 @@ Conditionals can also provide the `else` case.

### Negation

The inverse of `<% if %>` is `<% if not %>`.
You can check if a variable is false with `<% if not %>`.

```ss
<% if not $DinnerInOven %>
I'm going out for dinner tonight.
<% end_if %>
```

Note that you cannot combine this with other operators such as `==`.


For more nuanced check you can use the `!` operator.

```ss
<% if $MyDinner != "quiche" %>
Lets go out
<% end_if %>
```

### Boolean Logic

Multiple checks can be done using `||`, `or`, `&&` or `and`.
Expand Down

0 comments on commit 7daea92

Please sign in to comment.