JCR preview definition ensures that a content app can render previews of binary data (e.g. an image) for the JCR nodes of a given data source. It implements the PreviewDefinition interface.

JCR preview definition is part of the Magnolia 6 UI framework. The fully qualified class name is info.magnolia.ui.contentapp.preview.JcrPreviewDefinition.

If you work with the Magnolia 5 UI framework, see Image provider definition instead.

Example definition

datasource:
  $type: jcrDatasource
  workspace: contacts
  preview:
    nodeName: photo
    class: info.magnolia.ui.contentapp.preview.JcrPreviewDefinition
    extension: .png

List of properties

nodeName

required, default is JcrConstants.JCR_CONTENT

Name of the JCR node where the original source image is stored. For example, if a file upload field on a form stores the image in a node named photo, set the value to photo.

class

optional, default is info.magnolia.ui.contentapp.preview.JcrPreviewDefinition

Preview definition class that reads the configuration properties and can supply additional parameters to the class. Set the value to a fully qualified class name.

extension

optional, default is .jpg

Extension used to deliver the image.

generator

optional, default is portrait

Name of the image generator that generates thumbnail images.

servletPath

optional, default is .imaging

Path where the imaging servlet resides.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels