I’m trying to use programmable blueprints with blocks/layouts. Seems to work just fine for blocks, but for layouts it’s causing the columns to be shown as rows:
The programmable blueprint reads a yaml file and merges it with an array.
use Kirby\Data\Yaml;
$yamlFilePath = __DIR__ . '/layout.yml';
// Read the file contents
$yamlContent = file_get_contents($yamlFilePath);
// Parse the YAML content
$parsedData = Yaml::decode($yamlContent);
$yaml = [
'fieldsets' => [
'common' => [
'label' => 'Common',
'type' => 'group',
'extends' => 'fieldset/common',
],
...
]
];
return array_merge($parsedData, $yaml);
The yaml file contains the layouts fieldset:
layouts:
- 1/1
- 1/2, 1/2
- 1/3, 1/3, 1/3
- 1/4, 1/4, 1/4, 1/4
- 5/12, 7/12
- 7/12, 5/12
- 1/3, 2/3
- 2/3, 1/3
Everything else works as expected, but the layouts are displaying as rows instead of columns. They displayed as columns before using the “programmable blueprints” approach.
Any ideas?