kirby-color-palette
kirby-color-palette copied to clipboard
Can't access palette array in a block
Hi, I try to use this plugin inside a block but if I try to output the field with ->yaml() I got an array but the keys I can't select. If I write
$palette = $block->palette();
$background = $palette['background'];
$name = $palette['key'];
also
$palette = $block->palette();
$background = $palette[0];
$name = $palette[1];
result in an error Undefined array key "background"
or Undefined array key "0"
.
With dump I can output the array but nothing inside the arraqy. thats strange.
Cheers