Skip to content

Dynamic blueprints

Plugins can now define dynamic blueprints based on config settings, content and other factors.

<?php

Kirby::plugin('my/blueprint', [
    'blueprints' => [
        'pages/blog' => function ($kirby) {
            return [
                'title' => 'Blog',
                'sections' => [
                    'articles' => [
                        'type'     => 'pages',
                        'template' => 'article',
                        'limit'    => $kirby->option('blog.article.limit')
                    ]
                ]
            ];
        }
    ]
]);