Jump to content

how could i delete a page instantly, without moving to Trash


adrianmak
 Share

Recommended Posts

Or if you want via the admin rather than the API per GuruMeditation's suggestion, you could try Nico's module: http://modules.processwire.com/modules/process-page-delete/

In some ways it is obsolete now that the core has a built in trash action button, but it does offer delete/trash options. Keep in mind though that this will only work with the action buttons in the page list view - the "Delete" link in edit mode will still be trash.

Otherwise if you really feel the need, you could hook into Pages:trash (https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/Pages.php#L1517) and change the behavior to delete instead.

BUT, is trashing really so bad?

  • Like 1
Link to comment
Share on other sites

Or if you want via the admin rather than the API per GuruMeditation's suggestion, you could try Nico's module: http://modules.processwire.com/modules/process-page-delete/

In some ways it is obsolete now that the core has a built in trash action button, but it does offer delete/trash options. Keep in mind though that this will only work with the action buttons in the page list view - the "Delete" link in edit mode will still be trash.

Otherwise if you really feel the need, you could hook into Pages:trash (https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/Pages.php#L1517) and change the behavior to delete instead.

BUT, is trashing really so bad?

In some cases, it is better to delete page instantly.

I have pages to store form submission. If I found spam submission, there is no doubt to delete it permanently

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...