If I want to change the status of a page, how can I check if this page is added as a highlight in a multi select.
I want to prevent a page from being changed as a draft if this page exists in the selection. So that the user is informed that the selection of the highlight must be changed before the status of the page can be changed.
return [
'hooks' => [
'page.changeStatus:before' => function (Kirby\Cms\Page $page, string $status, ?int $position = null) {
// I could check here if the respective page exists in the highlight selection
//But how do I pass the hint on to the panel so that an error message or similar appears?
}
]
]
I’m missing some information. This highlights field, is it in multiple pages or just in a single page (estateoffers). It this page the parent of the pages you want to check?