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

LinkFieldDefinition renders a text field and a browse button that allows you to select an item from any data source. It extends ComboBoxFieldDefinition.

The link field is used to select targets inside Magnolia (for example, an asset to render an image or a page to tease) where it stores a reference to the selected item. Magnolia provides three preconfigured link field definitions:

  • DamLinkFieldDefinition: links to an asset (damLinkField).
  • PageLinkFieldDefinition: links to a page (pageLinkField).
  • JsonLinkFieldDefinition: links to a JSON node (jsonLinkField).

This link field definition is part of the Magnolia 6 UI framework. The fully qualified class name is info.magnolia.ui.field.LinkFieldDefinition.

If you work with the Magnolia 5 UI framework, see Link field for Magnolia 5 UI instead.

Example link field definition

  label: Select image
  $type: linkField
    $type: jcrDatasource
    workspace: contacts
  chooserId: myModule:chooser

Link field properties


optional, default is ui-framework-jcr:chooser

Unique identifier for the chooser dialog. If none is specified, the JCR chooser will be used by default.


optional, default is translated key

Button label before the target node is selected. The value is i18n-able.


optional, default is translated key

Button label after the target node is selected. The value is i18n-able.


optional, default is true

When false, the text field displaying the link cannot be edited once a target is selected.



Renders a preview of the selected content. The preview component typically displays an image thumbnail and some metadata.



Any class that implements the info.magnolia.ui.preview.ItemPreviewComponent interface. Examples:


See also combobox field, select field and common field properties.

  • No labels