IActionable

Modified on 2010/11/12 03:15 PM by jbrinkman Categorized as Uncategorized
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


Copyright 2014 by DNN Corp Terms of Use Privacy
Request
a Demo
See Evoq Live
Latest Blog
How to Make Advocate Marketing Work for You
Read It
Watch the Replay
Top 5 Reasons to Consider a Branded Online Community
Watch