When changing the template the panel, panel.page.update is triggered. While it seems correct at first, it has a pitfall.
panel.page.update is trigged both when the content inside a file has changed and when the file is renamed. This is two different operations. It require some extra work for a plugin developer like me to figure if the panel user updated the content or changed the template.
When changing the template the panel,
panel.page.update
is triggered. While it seems correct at first, it has a pitfall.panel.page.update
is trigged both when the content inside a file has changed and when the file is renamed. This is two different operations. It require some extra work for a plugin developer like me to figure if the panel user updated the content or changed the template.https://forum.getkirby.com/t/panel-templatechange-hook/8746
If we still want to keep
panel.page.update
for backward compability, we can just add two new hooks,panel.page.template
andpanel.page.save
.I think it should be one hook for one task.