• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class ModuleAction

Each Module Action represents a separate functional action as defined by the associated module.

Inheritance
System.Object
ModuleAction
Namespace: DotNetNuke.Entities.Modules.Actions
Assembly: DotNetNuke.dll
Syntax
public class ModuleAction : object
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

Constructors

| Improve this Doc View Source

ModuleAction(Int32, String, String, String, String, String, String, Boolean, SecurityAccessLevel, Boolean, Boolean)

Initializes a new instance of the ModuleAction class using the specified parameters.

Declaration
public ModuleAction(int id, string title, string cmdName, string cmdArg, string icon, string url, string clientScript, bool useActionEvent, SecurityAccessLevel secure, bool visible, bool newWindow)
Parameters
Type Name Description
System.Int32 id

This is the identifier to use for this action.

System.String title

This is the title that will be displayed for this action.

System.String cmdName

The command name passed to the client when this action is clicked.

System.String cmdArg

The command argument passed to the client when this action is clicked.

System.String icon

The URL of the Icon to place next to this action.

System.String url

The destination URL to redirect the client browser when this action is clicked.

System.String clientScript
System.Boolean useActionEvent

Determines whether client will receive an event notification.

SecurityAccessLevel secure

The security access level required for access to this action.

System.Boolean visible

Whether this action will be displayed.

System.Boolean newWindow
Remarks

The moduleaction constructor is used to set the various properties of the ModuleAction class at the time the instance is created.

| Improve this Doc View Source

ModuleAction(Int32, String, String, String, String, String, String, Boolean, SecurityAccessLevel, Boolean)

Initializes a new instance of the ModuleAction class.

Declaration
public ModuleAction(int id, string title, string cmdName, string cmdArg, string icon, string url, string clientScript, bool useActionEvent, SecurityAccessLevel secure, bool visible)
Parameters
Type Name Description
System.Int32 id
System.String title
System.String cmdName
System.String cmdArg
System.String icon
System.String url
System.String clientScript
System.Boolean useActionEvent
SecurityAccessLevel secure
System.Boolean visible
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

| Improve this Doc View Source

ModuleAction(Int32, String, String, String, String, String, String, Boolean, SecurityAccessLevel)

Initializes a new instance of the ModuleAction class.

Declaration
public ModuleAction(int id, string title, string cmdName, string cmdArg, string icon, string url, string clientScript, bool useActionEvent, SecurityAccessLevel secure)
Parameters
Type Name Description
System.Int32 id
System.String title
System.String cmdName
System.String cmdArg
System.String icon
System.String url
System.String clientScript
System.Boolean useActionEvent
SecurityAccessLevel secure
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

| Improve this Doc View Source

ModuleAction(Int32, String, String, String, String, String, String, Boolean)

Initializes a new instance of the ModuleAction class.

Declaration
public ModuleAction(int id, string title, string cmdName, string cmdArg, string icon, string url, string clientScript, bool useActionEvent)
Parameters
Type Name Description
System.Int32 id
System.String title
System.String cmdName
System.String cmdArg
System.String icon
System.String url
System.String clientScript
System.Boolean useActionEvent
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

| Improve this Doc View Source

ModuleAction(Int32, String, String, String, String, String, String)

Initializes a new instance of the ModuleAction class.

Declaration
public ModuleAction(int id, string title, string cmdName, string cmdArg, string icon, string url, string clientScript)
Parameters
Type Name Description
System.Int32 id
System.String title
System.String cmdName
System.String cmdArg
System.String icon
System.String url
System.String clientScript
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

| Improve this Doc View Source

ModuleAction(Int32, String, String, String, String, String)

Initializes a new instance of the ModuleAction class.

Declaration
public ModuleAction(int id, string title, string cmdName, string cmdArg, string icon, string url)
Parameters
Type Name Description
System.Int32 id
System.String title
System.String cmdName
System.String cmdArg
System.String icon
System.String url
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

| Improve this Doc View Source

ModuleAction(Int32, String, String, String, String)

Initializes a new instance of the ModuleAction class.

Declaration
public ModuleAction(int id, string title, string cmdName, string cmdArg, string icon)
Parameters
Type Name Description
System.Int32 id
System.String title
System.String cmdName
System.String cmdArg
System.String icon
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

| Improve this Doc View Source

ModuleAction(Int32, String, String, String)

Initializes a new instance of the ModuleAction class.

Declaration
public ModuleAction(int id, string title, string cmdName, string cmdArg)
Parameters
Type Name Description
System.Int32 id
System.String title
System.String cmdName
System.String cmdArg
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

| Improve this Doc View Source

ModuleAction(Int32, String, String)

Initializes a new instance of the ModuleAction class.

Declaration
public ModuleAction(int id, string title, string cmdName)
Parameters
Type Name Description
System.Int32 id
System.String title
System.String cmdName
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

| Improve this Doc View Source

ModuleAction(Int32)

Initializes a new instance of the ModuleAction class.

Declaration
public ModuleAction(int id)
Parameters
Type Name Description
System.Int32 id
Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

Properties

| Improve this Doc View Source

Actions

Gets or sets the Actions property allows the user to create a hierarchy of actions, with each action having sub-actions.

Declaration
public ModuleActionCollection Actions { get; set; }
Property Value
Type Description
ModuleActionCollection

Returns a collection of ModuleActions.

Remarks

Each action may contain one or more child actions. When displayed via the DotNetNuke.Containers.Actions control, these subactions are shown as sub-menus. If other Action controls are implemented, then sub-actions may or may not be supported for that control type.

| Improve this Doc View Source

ClientScript

Gets or sets javascript which will be run in the clients browser when the associated Module menu Action is selected. prior to a postback.

Declaration
public string ClientScript { get; set; }
Property Value
Type Description
System.String

The Javascript which will be run during the menuClick event.

Remarks

If the ClientScript property is present then it is called prior to the postback occuring. If the ClientScript returns false then the postback is canceled. If the ClientScript is empty then the Action Event is fired and is passed the value of the associated Command property.

| Improve this Doc View Source

CommandArgument

Gets or sets a Module Action CommandArgument provides additional information and complements the CommandName.

Declaration
public string CommandArgument { get; set; }
Property Value
Type Description
System.String

A string that contains the argument for the command.

Remarks

The CommandArgument can contain any string set by the programmer. The CommandArgument property complements the DotNetNuke.ModuleAction.CommandName property by allowing you to provide any additional information for the command. For example, you can set the CommandName property to "Sort" and set the CommandArgument property to "Ascending" to specify a command to sort in ascending order.

| Improve this Doc View Source

CommandName

Gets or sets a Module Action CommandName represents a string used by the ModuleTitle to notify the parent module that a given Module Action was selected in the Module Menu.

Declaration
public string CommandName { get; set; }
Property Value
Type Description
System.String

The name of the command to perform.

Remarks

Use the CommandName property to determine the command to perform. The CommandName property can contain any string set by the programmer. The programmer can then identify the command name in code and perform the appropriate tasks.

| Improve this Doc View Source

Icon

Gets or sets the URL for the icon file that is displayed for the given DotNetNuke.ModuleAction.

Declaration
public string Icon { get; set; }
Property Value
Type Description
System.String

The URL for the icon that is displayed with the module action.

Remarks

The URL for the icon is a simple string and is not checked for formatting.

| Improve this Doc View Source

ID

Gets or sets a Module Action ID is a identifier that can be used in a Module Action Collection to find a specific Action.

Declaration
public int ID { get; set; }
Property Value
Type Description
System.Int32

The integer ID of the current DotNetNuke.ModuleAction.

Remarks

When building a hierarchy of DotNetNuke.ModuleAction, the ID is used to link the child and parent actions.

| Improve this Doc View Source

NewWindow

Gets or sets a value indicating whether gets or sets a value that determines if a new window is opened when the DoAction() method is called.

Declaration
public bool NewWindow { get; set; }
Property Value
Type Description
System.Boolean

A boolean indicating whether to open a new window.

Remarks

A module action is used to define a specific function for a given module. Each module can define one or more actions which the portal will present to the user. These actions may be presented as a menu, a dropdown list or even a group of linkbuttons. DotNetNuke.ModuleActionCollection

| Improve this Doc View Source

Secure

Gets or sets the value indicating the DotnetNuke.SecurityAccessLevel that is required to access this DotNetNuke.ModuleAction.

Declaration
public SecurityAccessLevel Secure { get; set; }
Property Value
Type Description
SecurityAccessLevel

The value indicating the DotnetNuke.SecurityAccessLevel that is required to access this DotNetNuke.ModuleAction.

Remarks

The security access level determines the roles required by the current user in order to access this module action.

| Improve this Doc View Source

Title

Gets or sets the string that is displayed in the Module Menu that represents a given menu action.

Declaration
public string Title { get; set; }
Property Value
Type Description
System.String

The string value that is displayed to represent the module action.

Remarks

The title property is displayed by the Actions control for each module action.

| Improve this Doc View Source

Url

Gets or sets the URL to which the user is redirected when the associated Module Menu Action is selected.

Declaration
public string Url { get; set; }
Property Value
Type Description
System.String

The URL to which the user is redirected when the associated Module Menu Action is selected.

Remarks

If the URL is present then the Module Action Event is not fired. If the URL is empty then the Action Event is fired and is passed the value of the associated Command property.

| Improve this Doc View Source

UseActionEvent

Gets or sets a value indicating whether gets or sets a value that determines if a local ActionEvent is fired when the DotNetNuke.ModuleAction contains a URL.

Declaration
public bool UseActionEvent { get; set; }
Property Value
Type Description
System.Boolean

A boolean indicating whether to fire the ActionEvent.

Remarks

When a MenuAction is clicked, an event is fired within the Actions control. If the UseActionEvent is true then the Actions control will forward the event to the parent skin which will then attempt to raise the event to the appropriate module. If the UseActionEvent is false, and the URL property is set, then the Actions control will redirect the response to the URL. In all cases, an ActionEvent is raised if the URL is not set.

| Improve this Doc View Source

Visible

Gets or sets a value indicating whether gets or sets whether the current action should be displayed.

Declaration
public bool Visible { get; set; }
Property Value
Type Description
System.Boolean

A boolean value that determines if the current action should be displayed.

Remarks

If Visible is false, then the action is always hidden. If Visible is true then the action may be visible depending on the security access rights specified by the DotNetNuke.ModuleAction.Secure property. By utilizing a custom method in your module, you can encapsulate specific business rules to determine if the Action should be visible.

Methods

| Improve this Doc View Source

HasChildren()

Determines whether the action node contains any child actions.

Declaration
public bool HasChildren()
Returns
Type Description
System.Boolean

True if child actions exist, false if child actions do not exist.

Remarks

Each action may contain one or more child actions in the DotNetNuke.ModuleAction.Actions property. When displayed via the DotNetNuke.Containers.Actions control, these subactions are shown as sub-menus.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS