Export Page
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens
Exports a DNN page as XML and saves it in a token. The XML is DNN's own page format, with the page's settings, permissions and modules, including module content.
Nothing is saved to a file. The XML is only in the token, so you decide what to do with it next.
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
- Keep a copy of a page before you change or delete it
- Save a page as a template file with Save File, then create pages from it with Create Page
- Send a page's definition to another system, for example with an API call
Don't use it to
- Export the current page without naming it. Unlike the other page actions, an empty identifier doesn't mean the current page. Use
[Tab:TabId]instead. - Export a single module's content. Use Export Module Content instead.
- Read a few page details into tokens. Use Load Page instead.
Related Actions
| Action Name | Description |
|---|---|
| Create Page | Creates a page from a template file. |
| Save File | Saves the XML to a file in the portal. |
| Load Page | Reads a page's details into tokens. |
| Export Module Content | Exports the content of one module. |
| Import Module Content | Imports content into a module. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Page Identifier | The page to export. Select it from the list, or switch to an expression and 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 (as an expression) | empty string | Yes |
| Portal Identifier | The ID of the portal the page is in. Leave it empty to use the current portal. A value that isn't a number is ignored. | Yes | empty string | No |
Output Parameters Reference
| Parameter | Description |
|---|---|
| Store page content in Token | The name of the token that receives the page XML, for example PageExport. Square brackets are optional. If it's empty, the page is exported but the result is thrown away. |
What the XML contains
The token holds a single <tab> element, the same structure DNN uses in page templates. It includes the page's name, title, description, keywords, settings, permissions, and the page's panes and modules. Module content is included for modules that support DNN's export.
Create Page reads the first <tab> element in its template file. To use an export as a template, save the token with Save File in the Text mode, for example as Templates/Project.page.template, and point Dynamic Template at it.
Considerations
- No match fails the action. If the page can't be found, the action fails with
ExportPage could not get tab. - Names are ambiguous. Only the first page with a matching name is used. Prefer IDs or paths. A number is always treated as an ID.
- 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. - The export can contain private data. Module content, settings and role permissions are all in the XML. Don't show it to users or send it to outside systems without checking what's in it.
- Don't let users choose the portal. Portal Identifier can point to any portal in the installation. Don't build it from values users can change.
- The token might not appear in token suggestions. Type the token name yourself in the actions that follow.
- Large pages make large tokens. Pages with many modules or a lot of content produce long XML.
Examples
To understand how to use the below examples, please see Running Examples.
1. Export the current page
This action exports the current page and saves the XML in [PageExport].
{
"Title": "Export Page",
"ActionType": "ExportPage",
"Description": "Export the current page as XML",
"Parameters": {
"PageId": {
"Expression": "[Tab:TabId]",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"TokenNameForExport": "PageExport"
}
}
2. Save a page as a template file
These actions export the page at the path //Templates//Project and save the XML as a page template in the portal's Templates folder. Create Page can then use it as its Template. Set up the Save File action with the Text content source and [PageExport] as the text.
{
"Title": "Export Page",
"ActionType": "ExportPage",
"Description": "Export the project template page",
"Parameters": {
"PageId": {
"Expression": "//Templates//Project",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"TokenNameForExport": "PageExport"
}
}
Revised 09/27/2026