Delete Page (Hard)
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens
Permanently deletes a DNN page, all its child pages and the modules on them. The pages are removed from the database and can't be restored.
This can't be undone. The page doesn't go to the Recycle Bin. If you might need the page again, use Delete Page (Soft) instead, or keep a copy with Export Page first.
This action is part of the Portal Management add-on, which is installed and licensed separately (feature package PORTAL). If it isn't licensed, the action fails with a not-licensed error.
Typical Use Cases
- Remove pages for good when their records are deleted
- Clean up temporary pages created by Create Page
- Empty out pages that were already soft-deleted, as part of a cleanup workflow
Don't use it to
- Delete a page you may want back. Use Delete Page (Soft) instead.
- Remove a single module from a page. Use Delete Module (Hard) instead.
- Hide a page from the menu only. Use Update Page with Show In Menu set to
false.
Soft or hard delete
| Delete Page (Soft) | Delete Page (Hard) | |
|---|---|---|
| The page | Marked as deleted, kept in the database | Removed from the database |
| Child pages | Marked as deleted too | Removed too |
| Modules on the page | Left as they are | Removed with the page |
| Can be restored | Yes, from the Recycle Bin | No |
| If the page isn't found | Nothing happens, no error | The action doesn't check first |
Related Actions
| Action Name | Description |
|---|---|
| Delete Page (Soft) | Moves a page and its child pages to the Recycle Bin. |
| Export Page | Keeps a copy of the page as XML before you delete it. |
| Load Page | Checks a page's details before you delete it. |
| Delete Module (Hard) | Deletes a single module permanently. |
| Delete Portal | Deletes a whole portal. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Page Identifier | The page to delete. Leave it empty to delete the current page. Otherwise enter a page (tab) ID, a page path such as //Projects//Alpha, or a page name. It's tried in that order: a number is always treated as an ID, then a path is looked up, and then the first page with that name is used. | Yes | empty string | No |
Output Parameters Reference
This action doesn't produce output tokens.
Considerations
- Child pages are deleted too. Every page below the page, at any depth, is deleted.
- Don't leave the identifier empty by accident. An empty identifier deletes the current page, the one the form or listing is on. In a workflow or API with no current page, it fails with
Could not get current page. - Check the page first. The action doesn't check that the page exists or that it's the one you expect. Names are ambiguous, because only the first page with a matching name is used. Use an ID, and confirm it with Load Page if it comes from user input.
- Page paths put
//before each level, and spaces and other symbols are left out of the page names, for example//AboutUs//OurTeamfor the page Our Team under About Us. - Special pages aren't protected. The action doesn't stop you from deleting the home page or other pages the site depends on. Add a condition.
- There's no permission check in the action. Anyone who can run it can delete pages. Only put it where trusted users can reach it, and add a condition as a second guard.
Examples
To understand how to use the below examples, please see Running Examples.
1. Delete a temporary page
This action permanently deletes the page whose ID is in [TempPageId], but only when the ID isn't empty, so the current page is never deleted by accident.
{
"Title": "Delete Page (Hard)",
"ActionType": "DeletePage",
"Description": "Permanently delete the temporary page",
"Condition": "[TempPageId] != \"\"",
"Parameters": {
"PageId": "[TempPageId]"
}
}
Revised 09/27/2026