• 4/7/2015
  • 506 Views

Comments

506 Views

IActionable

Last updated 4 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
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
Contents
No sections defined
Try Evoq
For Free
Start Free Trial
Request
a Demo
See Evoq Live
REGISTER FOR THE WEBINAR
How to Build and Grow a Thriving Community on Your Website
REGISTER NOW
Latest Blog
How to Make Advocate Marketing Work for You
Read It