Panel page features instead of fields

I just saw Page Lock Plugin which looks really nice. Like many plugins it required to be added as a blueprint field. Maybe in a future we can change that?

Because…

  • It’s not a field.
  • It will add an empty field in the content text file. It saves data that is not needed.
  • It takes up some space in the html.
  • It needs to be added to the blueprint.

Features - Instead of fields

Register it like anything else and bind it to a template. Add a dirpath and optional $args, an array with options.

$kirby->set('panel::feature', 'projects', $dirpath, $args1);
$kirby->set('panel::feature', 'project', $dirpath, $args2);

No things is needed to be added in the blueprint.

Maybe we still want blueprint options in some cases. Here is how that would be possible.

fields:
  ...
features:
  lock:
    option1: something
    option2: else
  sideswitch:
    fullscreen: true

I don’t know yet how I think the base code would look like but I think it should have assets like fields.

2 Likes