Skip to content

Commit

Permalink
replaced wrong heading and added one
Browse files Browse the repository at this point in the history
replaced Bad with a wrong Good title and added an additional Good one
  • Loading branch information
opafritz authored and texnixe committed Feb 23, 2023
1 parent f187971 commit d8749e3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Working with absolute URLs in templates is a nightmare. That's why Kirby has the

In many situations you don't have to write a full if clause in your templates. There are shorter versions, which you should know about:

#### Good
#### Bad
```php
<?php if ($page->hasChildren()): ?>
Yay, children!
Expand All @@ -292,6 +292,7 @@ No children
<?php endif ?>
```

#### Good
```php
<?= $page->hasChildren() ? 'Yay, children!' : 'No children' ?>
```
Expand Down

0 comments on commit d8749e3

Please sign in to comment.