You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Here is an example workbench definition from the Contacts app. This workbench operates on the contacts workspace and displays contacts and folders.

(warning) Magnolia 5.3+: The nodeTypes, defaultOrder, includePropertiespath and workspace nodes moved from the workbench definition to the new content connector definition. The path property was renamed to rootPath.

Node nameValue

browser

 

workbench

 

contentViews

 

tree

 

list

 

columns

 

 
class

info.magnolia.ui.workbench.list.ListPresenterDefinition

thumbnail

 

search

 

 
dropConstraintClass

info.magnolia.contacts.app.main.tree.ContactDropConstraint

 
editable

false

Properties:

  • contentViews: Defines the views how the content is displayed.
    • <content view name>: The available views are treelistthumbnail and search.
      • columns: Column definitions for tree, list and search views. You don't need to define columns for the thumbnail view.
      • class: A presenter class that displays the content in a tree, list, thumbnail or search view. The options are 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") TreePresenterDefinition
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ListPresenterDefinition
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ThumbnailPresenterDefinition
         and 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") SearchPresenterDefinition
        . Use the fully-qualified class name. If you write your own presenter, look at the 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ConfiguredContentPresenterDefinition
         which implements the 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ContentPresenterDefinition
         interface.
      • viewType: Element of the 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ViewType
         enumeration: TREE, LIST, THUMBNAIL or SEARCH. You only need this property when you write your own view presenter.
      • implementationClass: In a workbench, the implementation class responsible for creating, configuring and updating the view. Typically a default implementation class is already hard-coded in the definition class. You only need to add this property if you want to override the default implementation with your own.

      • icon: CSS class that identifies an icon used on the view tab. For available names see Icons.
      • active: Defines whether the view is active. Default is true.
  • dropConstraintClass: Drag and drop constraint class. By restricting the nodes that a user can move you can enforce a hierarchy. For example, you might want to allow moving of content nodes under folders but not under other content nodes. If the class is not defined, the tree view will have no drag and drop capability. When you write your own class, implement the 
    $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") DropConstraint
     interface.
  • editable: Makes the data displayed in the workbench editable inline. When the user double-clicks the cell it becomes an editable field.

(warning) Magnolia 5.2 and earlier:

Node nameValue

browser

 

workbench

 

nodeTypes

 

contact

 

 
icon

icon-user-public

 
name

mgnl:contact

folder

 

 
icon

icon-folder-l

 
name

mgnl:folder

contentViews

 

tree

 

list

 

columns

 

 
class

info.magnolia.ui.workbench.list.ListPresenterDefinition

thumbnail

 

search

 

 
defaultOrder

jcrName

 
dropConstraintClass

info.magnolia.contacts.app.main.tree.ContactDropConstraint

 
editable

false

 
includeProperties

false

 
path

/

 
workspace

contacts

Properties:

  • nodeTypes:  The types of content displayed in the workbench. For example, the workbench in the Contacts app displays contacts and folders.
    • <node type name>
      • icon:CSS class name of the icon displayed on the workbench. See the default icons that ship with Magnolia or create your own.
      • nameNode type the workbench operates on. These are Magnolia or JCR node types such as mgnl:contact.
  • contentViews: Defines the views how the content is displayed.
    • <content view name>: The available views are treelistthumbnail and search.
      • columns: Column definitions for tree, list and search views. You don't need to define columns for the thumbnail view.
      • class: A presenter class that displays the content in a tree, list, thumbnail or search view. The options are 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") TreePresenterDefinition
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ListPresenterDefinition
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ThumbnailPresenterDefinition
         and 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") SearchPresenterDefinition
        . Use the fully-qualified class name. If you write your own presenter, look at the 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ConfiguredContentPresenterDefinition
         which implements the 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ContentPresenterDefinition
         interface.
      • viewType: Element of the 
        $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") ViewType
         enumeration: TREE, LIST, THUMBNAIL or SEARCH. You only need this property when you write your own view presenter.
      • implementationClass: In a workbench, the implementation class responsible for creating, configuring and updating the view. Typically a default implementation class is already hard-coded in the definition class. You only need to add this property if you want to override the default implementation with your own.

      • icon: CSS class that identifies an icon used on the view tab. For available names see Icons.
      • active: Defines whether the view is active. Default is true.
  • defaultOrder: Default sort order for the content items in list views. The value is the name of the property you want to sort by, such as jcrName.
  • dropConstraintClass: Drag and drop constraint class. By restricting the nodes that a user can move you can enforce a hierarchy. For example, you might want to allow moving of content nodes under folders but not under other content nodes. If the class is not defined, the tree view will have no drag and drop capability. When you write your own class, implement the 
    $webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") DropConstraint
     interface.
  • editable: Makes the data displayed in the workbench editable inline. When the user double-clicks the cell it becomes an editable field.
  • includeProperties: Displays also the JCR properties of the node when set to true. Only nodes and subnodes are displayed when false.
  • path: Path configured as root for this workspace. Only content below the path is operated on. If not specified, defaults to workspace root (/).
  • workspace: The workspace in the magnolia repository where the content resides.
#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels