Closed Pechente closed 6 months ago
The combination of blade snippets with slots is not working/supported. You have to use a plain PHP snippet to use the Kirby slots.
Try to rename snippets/layout/default.blade.php
into snippets/layout/default.php
.
Background: If the snippet is a Blade file it's rendered by Blade and the rending by Kirby, that handles the slots, is skipped.
To organize your templates in Blade, you can use Component. Blade components also support slot. Or include subviews.
Looks like #34 didn't add slots correctly or maybe I'm missing something here. Here's a minimal example that doesn't work:
templates/default.blade.php
snippets/layout/default.blade.php
expected output would be to have the content between the header and footer. instead it's output after it. Seems like slots are being completely ignored.
Am I doing something wrong here?
I created a minimum non-working demo here: https://github.com/Pechente/kirby-blade-slots-demo.git