Content view definition
Magnolia provides view implementations for JCR data that allow tree, list and thumbnail views. A content view must implement the info.magnolia.ui.contentapp.browser.ContentView interface.
| This content view definition is part of the Magnolia 6 UI framework.
The fully qualified class name is
 | 
Example definition
contentViews:
  - name: tree
    dropConstraint:
      $type: jcrDropConstraint
      primaryNodeType: mgnl:contact
    $type: treeView
    columns: &columns (1)
      - name: jcrName
        label: name
        $type: componentColumn
        editable: true
        nodeTypeToComponent:
          mgnl:contact:
            icon: icon-people
            showPath: true
          mgnl:content:
            icon: icon-folder
            showPath: true
        editor:
          availability:
            nodes: true
            properties: true
      - name: value
        label: value
        editable: true
        editor:
          availability:
            nodes: false
            properties: true
      - name: jcrPath
        label: path
        $type: pathColumn
      - name: status
        label: status
        $type: statusColumn
      - name: mgnl:created
        $type: dateColumn
        label: date
        editable: false
        editor:
          availability:
            nodeTypes:
              - mgnl:contact
            nodes: true
            properties: false
          field:
            $type: textField
            converterClass: com.vaadin.data.converter.StringToDateConverter
  - name: list
    columns: *columns (2)
    $type: listView
  - $type: thumbnailView| 1 | &columns- a YAML anchor that allows you to reuse the configuration elsewhere through a similarly formed YAML alias. | 
| 2 | *columns- the YAML alias marking the position where the configuration should be reused. | 
Content view properties
| Property | Description | ||
|---|---|---|---|
| 
 | required (unless  Class extending info.magnolia.ui.contentapp.configuration.ContentViewDefinition to define the type of view. Set the value to the fully qualified class name. See View types for possible values. | ||
| 
 | You can use this as a shortcut for  Example class annotation To use the  | ||
| 
 | required (used only in tree and list views) See Column definition. | ||
| 
 | optional (used only in tree and list views) 
 Defines acceptance criteria for move operations. By restricting the nodes that a user can move, you can enforce a certain node hierarchy. For example, you might want to allow moving content under folders but not folders under content. If no value is defined, the view will have no drag-and-drop capability. Possible values are: 
 The property  Example definition When you write your own class, implement the
 
 | ||
| 
 | optional, default is  Name of the content view. | ||
| 
 | optional, default is  CSS class that identifies an icon used for the view tab. For available names, see Icons. | ||
| 
 | optional, default is  Defines whether the workbench is editable inline. You can double-click a cell to edit its value. 
 | ||
| 
 | optional, default is  When  | ||
| 
 | optional, default is  When  | ||
| 
 | optional (used only in tree and list views), default is  Defines whether the selected item is scrolled into view when opening the content app. 
 | 
View types
Only one view is displayed in a browser subapp at a time. The first view type in the .yaml file is the one that’s displayed.
| $type | class | 
|---|---|
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 |