afbora / kirby-blade

Enable Laravel Blade Template Engine for Kirby 3
MIT License
20 stars 7 forks source link

Add support for snippet templates #12

Closed hemorej closed 4 years ago

hemorej commented 4 years ago

Currently only blade templates that are present in the configured template directory (/templates by default) are compiled. Is it possible to support compiling templates from the snippets directory too?

All of the snippets are basically really short templates, they're just organized elsewhere. Right now, my template templates are in beautiful blade syntax and my snippet templates are still wrapper in hard to read php tags

afbora commented 4 years ago

@hemorej Did you try partials like that @include("partials.note")? Here sample template that contains snippets/partials:

https://github.com/afbora/kirby-blade/blob/master/templates/notes.blade.php

You can look out sample template directory: https://github.com/afbora/kirby-blade#templates

hemorej commented 4 years ago

Ah of course I missed that. Thanks I'll try it out

afbora commented 4 years ago

Feel free reopen the issue if you need help.