Page.update:after hook compare content


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.

// title is included
// title is NOT included

Is there a better way to compare this?


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


i just want to compare the rest of the page.

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

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

that did the trick. thanks.