dialog

See also

actions dialog_open, dialog_close and overlay_open.

Opens a dialog with a predefined HTML content and title.

Example:

{% button action={dialog title="Wisdom" text="<p>The world is a pancake.</p>"} %}

This opens a dialog with the title “Wisdom”. The dialog is empty except for the text “The world is a pancake”.

Normally, instead of this action, the action dialog_open is used. The action dialog_open shows a dialog that is rendered on the server.

There can be many levels of dialogs open, they are designated by a level, the default dialog opens at level 0. Higher levels are displayed above lower levels. There is a special level "top" which ensures that a dialog is always opened above any other open dialog.

ArgumentRequiredDescription
titlerequiredDialog header title
textrequiredDialog body text
widthoptionalDialog width in pixels. Use "large" for a wide dialog and "small" for a small dialog.
addclassoptionalclassname will be appended to default dialog class
backdropoptionalboolean (0, 1), or the string "static" for a modal dialog (does not close on backdrop click); default 1
centeroptionalboolean (0, 1) default 1; set to 0 to align the dialog at the top
keyboardoptionalboolean (true, false) default: true; if true, closes when escape keys is pressed
leveloptionalNesting of the dialog. Non negative integer, higher numbered levels are displayed above lower levels. Special level "top" to force display on top.

Edit on GitHub