WIKI on DOTNETNUKE.COM

DotNetNukeDocs.com is no longer up and running as an editable Wiki. We encourage you to check out and contribute to the Wiki now hosted on DotNetNuke.com. http://wiki.dotnetnuke.com/ 

Nested ModuleActions


You might run into the need to organize your modules actions, if so DotNetNuke already supported nested module actions. An example can be found if you dig into the core for the 'Move' action menu. It's extremely simple to add a hierarchy structure if you follow these code samples.

Normally you would add actions into your module as follows:

Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl(), False, Security.SecurityAccessLevel.Edit, True, False)

To add a child menu with addional actions using the following syntax:

Dim objNestedActionRoot As Entities.Modules.Actions.ModuleAction = Actions.Add(GetNextActionID, "Add New Tab", Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl("mode", "new"), False, Security.SecurityAccessLevel.Edit, True, False)

objNestedActionRoot.Actions.Add(GetNextActionID, "Delete Current Tab", Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl("mode", "delete"), False, Security.SecurityAccessLevel.Edit, True, False)


 |  View Topic History  |