I’m setting background colour using color palette but the issue I’m having is that is causes an error when the key value isn’t selected in the panel - I thought this should be combated by “<?php if($page->palette()->isNotEmpty()): ?>” or setting the blueprint default but neither fix the error
<body data-theme="<?php if($page->palette()->isNotEmpty()): ?><?php $palette = $page->palette()->yaml(); echo $palette['key'] ?><?php else: ?>light<?php endif ?>">
Blueprint:
palette:
type: color-palette
label: Background Colour
width: 1/2
default: light
display: single
size: large
help: Page Colour Scheme
options:
light:
background: '#E5E5E5'
grey:
background: '#75787B'
dark:
background: '#333133'
default: 'light'