Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.

Page tree
Skip to end of metadata
Go to start of metadata

A dialog definition consists of actions and form subnodes. It is a very simple definition. The actual work is done in the form and action definitions which determine what content users can enter into the dialog and how to submit it. The class that reads the definition and configures the dialog is  ConfiguredDialogDefinition . You can configure your own dialogs in the /dialogs folder of your module.

This example dialog edits content in a Text & Image component. You can find the definition in Configuration > /modules/standard-templating-kit/dialogs/components/content/stkTextImage.

Node name

 modules

 standard-templating-kit

 dialogs

 components

 content

 stkTextImage

 actions

 form

 actionArea

Dialog properties:

  • actions: Contains action definitions which define how the data is submitted. The actions are rendered to users as buttons.  Typically you need at least Save and Cancel actions.
  • form: Contains a form definition which defines the fields where content is entered.
  • extends: (property) Extends another dialog definition. Set the value to a relative or absolute path that points to the extended dialog definition. Optional.
  • modalityLevel: Modality level defines how intrusive the dialog is. Valid values are strong (default), light and non-modal.
  • actionArea: Optional; it allows to define secondary actions. (see below for more details.)

See also: Referencing a dialog definition

ActionArea

The actionArea lets you provide additional actions and to specify a renderer if required. You need a renderer when the action requires more then just a button (for instance for an upload action).

Let's have a look at the chooseDialog of the assets subapp of the dam module. The root node of the configuration snippet below is /modules/dam-app/apps/assets/chooseDialog:

Node name 

 chooseDialog

 

 actions

 

 commit

 

 cancel

 

 upload

 

 uploadAndEdit

 

 actionArea

 

 secondaryActions

 

 upload

 

 uploadAndEdit

 

 actionRenderers

 

 upload

 

 rendererClass

info.magnolia.dam.app.assets.field.UploadAssetActionRenderer

 uploadAndEdit

 

 rendererClass

info.magnolia.dam.app.assets.field.UploadAndEditActionRenderer
  • actionArea
    • secondaryActions: Add subnodes which must have the same name like actions which you have defined in the actionsnode. The order of the subnodes defines the sequence in which they are rendered.
      • <actionName>
    • actionRenderers: Define a subnode for each action which requires its own renderer.
      • <actionName>
        • rendererClass: The class of the specific renderer which must implement  ActionRenderer
Note that the actions listed below the secondaryActions node are rendered on the left (whereas the other actions are on the right side).