pixelopen/kirby-customizable-layout 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

pixelopen/kirby-customizable-layout

最新稳定版本:1.0.2

Composer 安装命令:

composer require pixelopen/kirby-customizable-layout

包简介

A plugin for Kirby CMS to add customization to layouts

README 文档

README

GitHub release (with filter)

Dependency

A plugin for Kirby CMS to add a customizable layout fields

Commercial Usage

This plugin is free

Installation

Download

Download the files and place them inside site/plugins/kirby-customizable-layout.

Composer

composer require pixelopen/kirby-customizable-layout

Git Submodule

You can add the plugin as a Git submodule.

$ cd your/project/root
$ git submodule add https://github.com/Pixel-Open/kirby-customizable-layout.git site/plugins/kirby-customizable-layout
$ git submodule update --init --recursive
$ git commit -am "Add Kirby Customizable Layout plugin"

Run these commands to update the plugin:

$ cd your/project/root
$ git submodule foreach git checkout master
$ git submodule foreach git pull
$ git commit -am "Update submodules"
$ git submodule update --init --recursive

Options

To add a customizable layout field in your blueprint, you only have to extend fields/customizable-layout

For now, you need to add the fieldsets block-settings with the following lines in your /site/config/config.php:

return [
    'blocks' => [
        'fieldsets' => [
            'custom' => [
                'label' => 'Custom blocks',
                'type' => 'group',
                'fieldsets' => [
                    'block-settings',
                    // Other global custom blocks
                ]
            ],
          'kirby' => [
                'label' => 'Kirby blocks',
                'type' => 'group',
                'fieldsets' => [
                    'heading',
                    'text',
                    'list',
                    'quote',
                    'image',
                    'video',
                    'code',
                    'markdown'
                ]
            ]
        ]
    ]
];

You can also add your own fieldsets when you extend the fields, to add the block-settings block and all the other block you want to use.

Dont forget to call the snippet in the page where you use the plugin.

<?php snippet('customizable-layout', array('field' => $page->layout()))?>

The plugin work with color field from Kirby 4, you must create a new fields with your custom colors at /site/blueprints/fields/color.yml:

type: color
mode: options
options:
  color1: "#color1"
  color2: "#color2"
  color3: "#color3"
  color4: "#color4"
  color5: "#color5"

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-04