Page.update:after hook compare content

Hi,

is there a way to compare the whole content of a page in a hook?
i tried to compare $page->content()->toArray() in a page.update:after hook but the result is not helpfull.

$oldPage->content()->toArray();
// title is included
$newPage->content()->toArray();
// title is NOT included

Is there a better way to compare this?

Cheers
David

The page.update hook does not trigger when you change the title, that would be the page.changeTitle:after hook.

oh sorry,
my problem is that i don’t want the title in

$oldPage->content()->toArray();

i just want to compare the rest of the page.

Misunderstanding, sorry. You can unset the title and then compare.

$oldContent = $oldPage->content()->toArray();
unset($oldContent['title']);

that did the trick. thanks.