Multiselect field for Kirby 2 CMS
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
field Fix #23 Jun 18, 2017
.gitignore Restructured CSS as SCSS (using gulp) May 1, 2016
CHANGELOG.md Fix #23 Jun 18, 2017
README.md Typo Aug 10, 2017
field-multiselect.php Renamend and rewritten as plugin May 1, 2016
gulpfile.js Changelog prepared for 2.0.0 May 1, 2016
package.json Fix #23 Jun 18, 2017

README.md

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 blog 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