ActionList

From Sense/Net Wiki
Jump to: navigation, search
  •  
  •  
  •  
  •  
  • 100%
  • 6.0
  • Enterprise
  • Community
  • Planned

Overview

The ActionList control is a user control that displays a list of Action links for a specific Content.

ActionList control rendering a toolbar of Action links

Details

The context Content for the control is determined with 2 parameters:

  • if ContextInfo control is present (via ContextInfoID parameter) it determines the context,
  • if ContextInfo is not present, the value of the NodePath parameter selects the context.

The ActionMenu control resolves Actions via the Content Repository, which means that custom scenario implementations will NOT affect the rendered list of Action links.

Properties

  • ControlPath: the control that defines the layout of the list. Default is /Root/System/SystemPlugins/Controls/ActionList.ascx. Other built-in possibilities include:
    • /Root/System/SystemPlugins/Controls/ActionToolbar.ascx
    • /Root/System/SystemPlugins/Controls/ActionListGrid.ascx
  • ActionIconVisible: when set to false Action links are rendered without icons. Default is true.
  • NodePath: the path of the context Content to be addressed by the rendered menu.
  • ContextInfoID: the ID of the ContextInfo control that defines the context Content to be addressed by the rendered menu.
  • ContentPathList: list of content path that will be used to display actions for. All the actions will be the same, determined by the ActionName property (usually Browse)
  • ActionName: used with the ContentPathList property
  • Scenario: Actions of the given Action#Scenarios will be rendered. Scenario keywords are given in the Application configuration. If empty, all Actions for the context Content will be rendered.
  • ScenarioParameters: custom url parameters can be provided for the Action links.
  • WrapperCssClass: a custom css class that is rendered in the html markup of the list.

Example/Tutorials

Simple example:

   <sn:ActionList runat="server" ID="ActionList" Scenario="ListItem" />

Example of rendering a toolbar of Actions:

   <sn:ContextInfo runat="server" Selector="CurrentContext" UsePortletContext="true" ID="myContext" />
   <sn:ActionList runat="server" Scenario="ExploreToolbar" ContextInfoID="myContext" ControlPath="/Root/System/SystemPlugins/Controls/ActionToolbar.ascx" />

Example of rendering a grid of Actions:

   <sn:ActionList runat="server" ID="ActionList" ControlPath="/Root/System/SystemPlugins/Controls/ActionListGrid.ascx" />

Related links

References