Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to define layouts in plugins #5

Closed
HYR opened this issue May 10, 2022 · 3 comments
Closed

Add ability to define layouts in plugins #5

HYR opened this issue May 10, 2022 · 3 comments

Comments

@HYR
Copy link

HYR commented May 10, 2022

Would love to have the ability to register layouts via a plugin instead of having to have inside of the site/layouts folder.

Any Plugin Index.php

'layouts'     => [
    'default' => __DIR__ . '/layouts/default.php',
    'blog' => __DIR__ . '/layouts/blog.php',
    …
],

Related forum post: https://forum.getkirby.com/t/how-do-i-register-layouts-in-plugins/25455

@fabianmichael
Copy link

I just played around with the plugin and wondered why the plugin does not just use templates/layouts as the default part for storing layouts. That way, layouts could be registered without the need of a whole new extension API.

@lukasbestle
Copy link
Member

Our goal is to merge the layouts plugin into the core at some point. Then we'll also be able to easily provide a plugin extension for this feature.

@bastianallgeier
Copy link
Member

This is now possible with our snippets with slots in 3.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants