Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.
Reference to a dialog definition tells the system which dialog it should open when a user executes an action. You can reference your dialog definition from two places.
Dialogs are used to enter content for pages, areas and components. All three content elements share the same template definition class ConfiguredTemplateDefinition and they reference a dialog definition in the same way.
In the page/area/component definition, create a dialog
property and set its value using the following format:
<module name>:<relative path to dialog>
The value has two parts, separated by a colon:
Example:
standard-templating-kit:/components/content/stkTextImage
The relative path starts from the /modules/<module name>/dialogs
folder. In the example above, the stkTextImage
dialog definition is in /modules/standard-templating-kit/dialogs/components/content
, the relative path is /components/content/stkTextImage
.
Here is an example template definition with a dialog reference.
Node name | Value |
---|---|
modules | |
standard-templating-kit | |
templates | |
components | |
content | |
stkTextImage | |
dialog | standard-templating-kit:components/content/stkTextImage |
renderType | stk |
templateScript | /templating-kit/components/content/textImage.ftl |
Dialogs are used in actions to collect information from the user, such as a page name in the Add page action.
In your action definition, create a dialogName
property and set its value using the following format:
<module name>:<dialog name>
OpenEditDialogActionDefinition
and OpenCreateDialogActionDefinition
are examples of repository actions that open a dialog when executed. The dialog asks the user for a node name and creates or edits the node in the repository on submit.
Here is the Add folder action in the Pages app.
Node name | Value |
---|---|
modules | |
pages | |
apps | |
pages | |
subApps | |
browser | |
actions | |
add | |
class | info.magnolia.ui.framework.action.OpenCreateDialogActionDefinition |
dialogName | pages:createPage |
icon | icon-add-item |
label | Add page |
nodeType | mgnl:page |