Skip to main content
Version: 1.28 (Current)

Add Existing Module

Audience: Low-code Engineers

Skill Prerequisites: Actions, Tokens

Adds a module that's already on one page to another page. By default the new instance is shared with the original: it's the same module, so its content and settings are the same on both pages. Turn on Make A Copy to create an independent copy instead.

note

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​

  • Show the same banner, contact block or menu module on several pages, and edit it in one place
  • Copy a configured module from a template page to a new page made with Create Page
  • Build a page from parts of other pages

Don't use it to​

  • Create a new, empty module. Use Add Module instead.
  • Move a module. The original stays on the source page. Remove it afterwards with Delete Module (Soft) if you want a move.
Action NameDescription
Add ModuleAdds a new, empty module to a page.
Load ModuleReads a module's settings into tokens.
Update ModuleChanges a module's title, display options, dates and permissions.
Delete Module (Soft)Removes a module instance from a page to the Recycle Bin.
Delete Module (Hard)Removes a module instance from a page permanently.
Export Module ContentExports a module's content.
Create PageCreates the destination page.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
Source TabThe page that has the module. Pick a page, or use an expression that resolves to a Tab ID. It must be a page in the current portal.YesnoneYes
Destination TabThe page to add the module to. Pick a page, or use an expression that resolves to a Tab ID. It must be a page in the current portal.YesnoneYes
Module TypeFilters the Module list to one type of module on the source page. It's only a helper for picking the module and isn't used when the action runs.YesnoneNo
ModuleThe module to add. Pick it from the list, or use an expression that resolves to a module ID. The module must be on the source page.YesnoneYes
PaneThe name of the skin pane to place the module in on the destination page.YesContentPaneNo
Position in the paneTop (0) or Bottom (-1), or an expression that resolves to a whole number. If empty or not a number, the module goes to the bottom.YesBottomNo
Make A CopyOff: the new instance is shared with the original module. On: an independent copy is created.YesfalseNo
Output Module Id TokenThe name of a token to receive the module ID of the added module. For example, AddedModuleId gives you [AddedModuleId]. Leave empty if you don't need it.Noempty stringNo

Output Parameters Reference​

ParameterDescription
Output Module Id TokenThe token named here receives the module ID. For a copy, it's the new module's ID. For a shared instance, it's the original module's ID, because both pages use the same module.

Shared instance or copy​

Shared (Make A Copy off)Copy (Make A Copy on)
Module IDSame as the originalA new module ID
ContentThe same content. Edits show on both pages.Copied once. After that, the two modules are independent.
Module settingsSharedCopied
Page-specific settings (tab module settings)CopiedCopied
Deleting one instanceThe other page keeps its instanceThe other module isn't affected

Content is copied only for modules that support DNN's import and export (IPortable). For other module types, a copy gets the settings but not the content.

Considerations​

  • The action needs a portal. Both pages are looked up in the current portal. The action fails with Couldn't find the source tab with the id ... or Couldn't find the destination tab with the id ... when a page can't be found.
  • Other failures return a general message. If the module isn't on the source page, or DNN can't add it, the action fails. Administrators see Could not add the module (ModuleId: ... from the page ... to the page ..., and other users see Something went wrong. Please contact the site administrators for help.
  • The page stylesheet may be copied. If the source page has a custom stylesheet and the destination page has none, the source page's stylesheet is set on the destination page too.
  • Shared instances are affected by changes to the module. For example, Update Module permissions and dates belong to the module, so they apply on every page that shows it.
  • There's no permission check in the action. Anyone who can run it can place modules on any page in the portal. Only run it where trusted users can reach it.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Share a contact module on a new page​

This action adds module 412 from page 57 to the page in [NewPageId], at the top of the ContentPane. The module is shared, so editing it on either page changes both.

{
"Title": "Add Existing Module",
"ActionType": "AddExistingModule",
"Description": "Share the contact module on the new page",
"Parameters": {
"SourceTabId": "57",
"DestinationTabId": "[NewPageId]",
"ModuleId": "412",
"PaneName": "ContentPane",
"Position": "0",
"MakeACopy": "false",
"OutputToken": "ContactModuleId"
}
}

2. Copy a module from a template page​

This action copies the module in [TemplateModuleId] from the page in [TemplatePageId] to the page in [NewPageId], and saves the new module's ID in [CopiedModuleId]. It runs only when a template module is set.

{
"Title": "Add Existing Module",
"ActionType": "AddExistingModule",
"Description": "Copy the template module to the new page",
"Condition": "[TemplateModuleId] != \"\"",
"Parameters": {
"SourceTabId": "[TemplatePageId]",
"DestinationTabId": "[NewPageId]",
"ModuleId": "[TemplateModuleId]",
"PaneName": "ContentPane",
"Position": "-1",
"MakeACopy": "true",
"OutputToken": "CopiedModuleId"
}
}

Revised 09/27/2026