Skip to content

Releases: getkirby/layouts

2.0.1

09 May 16:54
Compare
Choose a tag to compare

This is for packagist trigger since compatible PHP versions updated in the composer.json file.

2.0.0

17 Jan 13:40
c181ebf
Compare
Choose a tag to compare

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

03 Jan 13:23
Compare
Choose a tag to compare
  • Fixed global layout data #1

1.0.0

18 Nov 12:09
5053259
Compare
Choose a tag to compare
Update README.md