Hi folks,
i created a bunch of plugins for my current project. Now i want each plugin to make use of a centralized field. How would the correct path look alike?
My current structure:
- site
-- blueprints
--- fields
---- padding.yml (This is the centralized field which i want to use in all plugins)
-- plugins
--- myplugin
---- blueprints
----- myplugin.yml (Here i refer the field 'padding')
---- index.php (Here i am trying to register the padding.yml)
index.php:
<?php
Kirby::plugin('su/myplugin', [
'blueprints' => [
'blocks/myplugin' => __DIR__ . '/blueprints/myplugin.yml',
'fields/padding' => '/blueprints/fields/padding.yml', // THIS IS PROBABLY WRONG?
],
'snippets' => [
'blocks/myplugin' => __DIR__ . '/snippets/myplugin.php',
],
]);
myplugin.yml:
name:
de: Mein Plugin
en: My plugin
tabs:
main:
label:
de: Einstellungen
en: Settings
fields:
headline:
type: text
label:
de: Titel
en: Title
padding: fields/padding (Here i am trying to make use of the centralized field)
padding.yml:
padding:
type: radio
default: none
label:
de: Zusätzlicher Abstand
en: Additional padding
options:
none:
de: Keiner
en: None
padding-s:
de: Abstand S
en: Padding S
padding-l:
de: Abstand L
en: Padding L