The JCR data source provides a flat or hierarchical structure of JCR nodes from a given JCR workspace in a specified root path.
The JCR data source is part of the Magnolia 6 UI framework.
The fully qualified class name is info.magnolia.ui.datasource.jcr.JcrDatasourceDefinition.
If you work with the Magnolia 5 UI framework, see Content connector instead.
Example definition
datasource:$type:jcrDatasourceworkspace:contactsincludeProperties:truepreview:nodeName:photoallowedNodeTypes:-mgnl:contact-mgnl:foldernodeNameProperty:namedescribeByProperty:lastName# will display a contact's last name instead of its JCR pathsortBy:lastName:ascendingfirstName:descendingCopy
List of properties
Property
Description
class or $type
required
Use info.magnolia.ui.datasource.jcr.JcrDatasourceDefinition for the class property or jcrDatasource for the $type shortcut.
workspace
required
Name of the workspace in the magnolia repository you want to browse.
preview
optional
Specifies the parameters for info.magnolia.ui.contentapp.preview.JcrPreviewProvider.
List of node types the data source operates on.
If no value is specified, the data source will operate on all node types.
describeByProperty
optional
Value must be a JCR property present on the nodes of the corresponding workspace.
If the node does not contain the given property, the node path will be used instead.
includeProperties
optional, default is false
When true, shows JCR properties of the node. When false, Only nodes and subnodes are displayed.
includeSystemNodes
optional, default is false
When true, shows system nodes.
includeSystemProperties
optional, default is false
When true, shows system properties.
name
optional, default is jcr
Name of the data source.
nodeNameProperty
optional
Name of a JCR property displayed by componentColumn that stores node names including special characters.
When configuring nodeNameProperty, make sure you have a field with the same name for the node names to be handled correctly.
rootPath
optional, default is /
Path configured as the root of the workspace.
Only content below the path is operated on.
sortBy
optional
List of properties the data source sorts by.
Possible values for SortDirection are ascending and descending.
If you set jcrName as a property, you can sort an item by its JCR node name.
Setting jcrPath allows you to sort items by their JCR path.
Module component mappings can be defined in the context of the current data source (a component section should have an id in the form of <id>datasource-<ds-name></id>, where <ds-name> is configured in the definition).
Publication status (info.magnolia.ui.contentapp.column.jcr.JcrStatusColumnDefinition)
Any other JCR property value
Because filter objects are shared between views, the same filter components should be available in both tree and list views (except for info.magnolia.ui.contentapp.column.jcr.JcrPathColumnDefinition, which is expected to be only in the list view).