Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 9 Current »

There are different ways to use the module.

Option 1: Overwrite the magnolia dam app decoration file in the resources app.

Find the file in the decorations app and edit it.

Add the item usage workbench code snippet to the workbench column. You can add additional column properties like label and width. See https://docs.magnolia-cms.com/product-docs/6.2/Apps/App-configuration/Column-definition.html#_column_properties for all list of all properties.

itemUsage: &itemUsage
  $type: itemIdUsageColumn
  descriptionGenerator: ch.esense.itemusage.ItemUsageDescriptionGenerator

After closing and re-open the dam app, the new column appears in tree workbench.

Option 2: Decorate the dam app in your module

Add the following folder structure to your modules decorations folder.

dam/apps

Create a yaml file

dam.subApps.jcrBrowser.workbench.yaml

It should look like this

Overwrite the default magnolia asset tree workbench. Add following code to the new created yaml file.

contentViews:
  - name: tree
    columns:
      name: &name
        class: info.magnolia.dam.app.contentview.column.JcrAssetNameColumnDefinition
        nodeTypeToIcon:
          mgnl:folder: icon-folder
          mgnl:asset: icon-assets-app
      title: &title
        filterComponent:
          $type: textField
      type: &type
        class: info.magnolia.dam.app.contentview.column.AssetTypeColumnDefinition
        width: 100
      itemUsage: &itemUsage
        $type: itemIdUsageColumn
        descriptionGenerator: ch.esense.itemusage.ItemUsageDescriptionGenerator
        width: 100
      jcrPublishingStatus: &status
        $type: jcrStatusColumn
      mgnl:lastModified: &created
        $type: dateColumn
        width: 170

YAML workbench column code snippet

itemUsage: &itemUsage
  $type: itemIdUsageColumn
  descriptionGenerator: ch.esense.itemusage.ItemUsageDescriptionGenerator

YAML code-snippet for the item usage workbench column

  • No labels