Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access palette array in a block #30

Open
janstieler opened this issue Jun 30, 2023 · 0 comments
Open

Can't access palette array in a block #30

janstieler opened this issue Jun 30, 2023 · 0 comments

Comments

@janstieler
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant