GithubHelp home page GithubHelp logo

kirby-field-modules's Introduction

Kirby Modules Field

This field was built to extend the Kirby Modules Plugin by providing a more user friendly interface to the plugin

Preview

Installation

To install the field, please put it in the site/fields directory.

Blueprints

After installing the custom form field, you can use the new type field modules.

fields:
  title:
    label: Title
    type: text
  modules:
    label: Modules
    type: modules

Options

label: Modules
type: modules
style: items
readonly: false
options:
  redirect: false
  preview: true
  delete: true
  limit: null
  edit: true
Option Default Description
style items Available styles are items and table.
readonly false Don't allow changes.
redirect false Determine if the user should get redirected after adding a new module.
preview true The template for this preview must be located inside the modules folder site/modules/gallery/ and must be named gallery.preview.php. The $module object is available in the template.
delete true Hide or show the delete button.
limit null Limit how many modules with the same template can be visible.
edit true Hide or show the edit button.

Template specific options

Add template specific options to override the default options.

label: Modules
type: modules
options:
  redirect: false
  preview: true
  delete: true
  limit: null
  edit: true

  module.text:
    redirect: true
    preview: false

  module.gallery:
    limit: 1
    edit: false

Max number of modules

To limit the total number of visible modules set the max option in the subpage settings.

title: Modules
pages:
  template:
    - module.text
    - module.gallery
  max: 4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.