Kirby field that acts as a one-entry structure.
Installs: 1 142
Open Issues: 1
Kirby field that allows you to add other fields to it with the intention of scoping them. It works like a Structure with one entry but with much cleaner UI.
From oblik/kirby-entity-field on Packagist using Composer:
composer require oblik/kirby-entity-field
In the blueprint:
fields: header: type: entity icon: title # optional toggle: true # optional fields: title: type: text logo: type: files
In the template, use the
$header = $page->header()->toEntity(); echo $header->title();
toggle option is enabled, the field form can be collapsed. The state is persisted in
localStorage for when the user navigates away from the page and back.
To enable this option globally for all fields (instead of explicitly setting it in the blueprint for each field), add the following to your
return [ 'oblik.entity-field' => [ 'toggle' => true ] ];