Hook for page.edit