Skip to content

pwaldhauer/field-multiselect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiselect Field for Kirby CMS

Release Issues Moral License

The Multiselect field plugin introduces a select field type for the panel that allows you to choose multiple entries.

The plugin is free, but I would appreciate it if you would support me with a moral license!

Requirements

Since version 1.0.0 the multiselect field requires Kirby CMS 2.3 or higher.
If you are running an older version of Kirby, please use version 1.4.0 of the multiselect field.

Installation & Update

Copy the files to site/plugins/field-multiselect/.

Usage

Use it in your blueprint:

bestband:
  label: Best Band Ever
  type: multiselect
  required: true
  search: true
  options:
    1d : 1Direction
    bb: BBoys
    aq: Aqua
    vb: Vengaboys
    fr: Freiheit
    o3: OH!O
    mi: Miley
    bi: Bieber
    u2: U2

Result:

multiselect

It can also be used with the usual field options (pages etc.) of the checkboxes field.

Use Case: Related Pages

A great use for the multiselect field are related pages/articles. Just set up e.g. your glog article blueprint as follows:

related:
  label: Related Articles
  type: multiselect
  search: true
  options: query
  query:
    fetch: siblings
    value: '{{id}}'

And then use them in your template:

<?php foreach($page->related()->pages(',') as $related): ?><?php endforeach ?>

Version history

You can find a more or less complete version history in the changelog.

License

MIT License

Author

Nico Hoffmann - https://nhoffmann.com

About

Multiselect field for Kirby 2 CMS

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 71.2%
  • CSS 15.1%
  • PHP 13.7%