Releases: getkirby/layouts
Releases · getkirby/layouts
2.0.1
2.0.0
This release migrates the code for the layout plugin to our new snippets with slots.
🚨 Breaking changes
- Requires Kirby 3.9.0
- The slot syntax in layout snippets has changed.
🚛 Migration
Layout snippets have to use our new $slots
syntax: http://getkirby.com/docs/guide/templates/snippets#passing-slots-to-snippets
Old default slot definition
<?php slot() ?>
<?php endslot() ?>
New default slot definition
<?= $slot ?>
Old named slot definition
<?php slot('head') ?>
<?php endslot() ?>
New named slot definition
<?= $slots->head() ?>
Old slot fallback content
<?php slot('head') ?>
<head>
...
</head>
<?php endslot() ?>
New simple slot fallback content
<?= $slots->head() ?? 'My fallback' ?>
New extended slot fallback content
<?php if ($head = $slots->head() ?>
<?= $head ?>
<?php else: ?>
<head>
...
</head>
<?php endif ?>
1.0.1
1.0.0
Update README.md