1

Is it possible to disable the copy functionality provided in Wagtail?

My team has some logic for a custom page type that is having some issues. We'd like to prevent people from using the copy functionality for a short period of time while we figure out what's going on, and how to fix it.

commadelimited
  • 5,656
  • 6
  • 41
  • 77

1 Answers1

2

You could use the before_copy_page hook, e.g. to redirect editors to the listings page with a notification explaining that copying has been temporarily disabled:

https://docs.wagtail.io/en/v2.5/reference/hooks.html#before-copy-page

tomd
  • 1,373
  • 1
  • 8
  • 12
  • That seems like a perfect approach, and low impact too. Thanks Tom! – commadelimited Jun 11 '19 at 16:37
  • @tomd, is there a way to use that hook to customize the fields displayed on the copy dialog that allows users to change the slug associated with the page? Preferably, without having to make a whole new copy interface from scratch? https://stackoverflow.com/questions/55640685/how-do-i-customize-the-wagtail-page-copy-experience – Colin Jun 11 '19 at 18:29