Summary: Mark pages for delete and allow review.
Version: 0.4.1
Prerequisites: pmwiki-2.0
Last-tested-with: pmwiki-2.3.11
Status: stable
Maintainer: Kt007
Users: (View? / Edit)


Provide the opportunity to mark pages for deletion and collect them on a summary page for a peer review or later deletion by the administrator.


The mark for deletion process works this way

  • put a snippet in your template which gives you a delete link
  • when clicked, it leads to a form. Here you can give a short statement why the page should be deleted. Then
    • a note is put on the page about its delete status
    • a note is put on a summary page that collects all marked sites by week (example)


Note: "pagename" refers to "Group.Name" Include markfordelete.phpΔ in your config file:


Set the parameters:


pagename of the summary page
pagename of the wiki site with the form (See Notes)


message shown if a page is allready marked for deletion. can be a pagename for redirection or html formated string
can be a pagename which is included or wiki markup formated string. (e.g. a Sticky Note)
format of the template link
pagename strings which should not get an delete link in RegEx style "term1|term2|...|termX"


  'Week from' => 'Header on the summary page',
  'New Deletion Candidate' => 'Text in the RecentChanges for the summary page',
  'Marked for Deletion' => 'Text in the RecentChanges for the marked page',
  'Delete' => 'Text of the template snippet',

The Template Snippet

Put in your skin template file


which outputs the deletion link. The deletion link will only be set if the current page is not already on the summary page and its name doesn't match someting in $MarkForDeleteExcludePattern.

The Form

There is a new Form variable which holds the name of the site you want to mark. The pagename of the form is set by $MarkForDeleteForm.

The form should look something like this:

You want to mark the site  [[{$PageToDelete}]] for deletion.

(:input form "" post:)
Why should the page be deleted:
(:input text shortexplain size=80 :)
(:input hidden action markfordelete :)
(:input hidden perform true :)
(:input hidden pagetodelete {$PageToDelete} :) 
(:input submit value="Go":)
(:input end:)

You want to mark the site for deletion.

Why should the page be deleted:


You can bypass the form, if you want, by providing paramters when calling the markfordelete action:



  • v0.2 - Schlaefer November 21, 2005, at 06:17 AM
  • v0.4 - Kt007 September 4, 2022, at 12:12 PM - Now fully functional with PHP 8

See Also



See discussion at MarkForDelete-Talk?

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.