承接 presprog/kirby-php-blueprint-loader 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

presprog/kirby-php-blueprint-loader

最新稳定版本:0.1.0

Composer 安装命令:

composer require presprog/kirby-php-blueprint-loader

包简介

Load PHP blueprints not only from plugins, but your `site` folder, too!

README 文档

README

Kirby PHP Blueprint Loader Plugin

Kirby PHP Blueprint Loader Plugin

Start using PHP blueprints in your site folder today!

⚡ Ready for Kirby 4!

🚀 How to use

Kirby lets you use PHP-based blueprints in plugins, e.g. to use different blueprints for different user roles. This is thoroughly described in Sonja's fantastic cook book article. Unfortunately, this does not work with the native blueprints folder, usually residing in site/blueprints.

After installing this plugin, you can start using PHP-based blueprints in site/blueprints folder, just like you would in plugins!

// site/blueprints/pages/blueprint.php

$user = kirby()->user();

$fields = [
    // Field config for all users
];

if ($user->isAdmin()) {
    $fields = [
      // Admins should have a separate set of fields
    ];
}

return [
    'title' => 'PHP-based blueprint',
    'fields' => $fields,
]

⚠️ Any existing YAML blueprint under the same name will be overwritten.

💻 How to install

Install this plugin via Composer:

composer require presprog/kirby-php-blueprint-loader

Or download the ZIP file from GitHub and unpack it to site/plugins/php-blueprint-loader

📄 License

MIT License Copyright © 2025 Present Progressive

Made by Present Progressive for the Kirby community.

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-02