New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

  • 4/7/2015
  • 7338 Views
IActionable is an interface designed to allow module developers to add menu items to the Module Action Menu for the module.

IActionable requires the implementation of a single, readonly, property named ModuleActions. The ModuleActions property returns a DotNetNuke.Entities.Modules.Actions.ModuleActionCollection which contains a collection of ModuleActions. The collection of ModuleActions are used by the framework to insert actions at the top of the Module Actions Menu.

Example Code (VB)

Class Declaration


Partial Class View
Inherits PortalModuleBase
Implements IActionable

Implementation


Public ReadOnly Property ModuleActions() As Entities.Modules.Actions.ModuleActionCollection Implements Entities.Modules.IActionable.ModuleActions
Get
Dim Actions As New Entities.Modules.Actions.ModuleActionCollection
Actions.Add(GetNextActionID, Localization.GetString("SomeString", LocalResourceFile), _
Entities.Modules.Actions.ModuleActionType.AddContent, "", "", _
EditUrl(), False, _
SecurityAccessLevel.Edit, True, False)
Return Actions
End Get
End Property


Example Code (C#)

Class Declaration


Partial Class View : PortalModuleBase, IActionable

Implementation


public ModuleActionCollection ModuleActions
{
get
{
ModuleActionCollection actions = new ModuleActionCollection
{{GetNextActionID(),
Localization.GetString("SomeString", LocalResourceFile),
"",
"",
"",
EditUrl(),
false,
SecurityAccessLevel.Edit,
true,
false}};
return Actions;
}
}



Sample Code Source

The above sample code can be found in the DNNSimpleArticle Project on Codeplex

Comments

Common

(Enter the content of this article below)
IActionable is an interface designed to allow module developers to add menu items to the Module Action Menu for the module.

IActionable requires the implementation of a single, readonly, property named ModuleActions. The ModuleActions property returns a DotNetNuke.Entities.Modules.Actions.ModuleActionCollection which contains a collection of ModuleActions. The collection of ModuleActions are used by the framework to insert actions at the top of the Module Actions Menu.

Example Code (VB)

Class Declaration


Partial Class View
Inherits PortalModuleBase
Implements IActionable

Implementation


Public ReadOnly Property ModuleActions() As Entities.Modules.Actions.ModuleActionCollection Implements Entities.Modules.IActionable.ModuleActions
Get
Dim Actions As New Entities.Modules.Actions.ModuleActionCollection
Actions.Add(GetNextActionID, Localization.GetString("SomeString", LocalResourceFile), _
Entities.Modules.Actions.ModuleActionType.AddContent, "", "", _
EditUrl(), False, _
SecurityAccessLevel.Edit, True, False)
Return Actions
End Get
End Property


Example Code (C#)

Class Declaration


Partial Class View : PortalModuleBase, IActionable

Implementation


public ModuleActionCollection ModuleActions
{
get
{
ModuleActionCollection actions = new ModuleActionCollection
{{GetNextActionID(),
Localization.GetString("SomeString", LocalResourceFile),
"",
"",
"",
EditUrl(),
false,
SecurityAccessLevel.Edit,
true,
false}};
return Actions;
}
}



Sample Code Source

The above sample code can be found in the DNNSimpleArticle Project on Codeplex