Skip to main content
Version: Next

Alternative Element Trees Configuration

At the moment, the Alternative Element Trees are only available for Data Objects.

This page explains how to add a new configuration for an alternative element tree.

note

Please ensure the migrations were executed and you have workers processing the Alternative Element Trees transport as explained in the bundle configuration section.

The Alternative Element Trees functionality can be accessed from the sidebar menu in the Settings > Data Objects > Alternative Element Trees section.

Menu locationMenu locationMenu location

You can add an alternative tree configuration in the newly opened tab via Add Configuration or upload a configuration in JSON format via the Import Import buttonImport buttonImport button button. Your configuration will appear in the configurations list on the left side of the window.

Create new ConfigurationCreate new ConfigurationCreate new Configuration

You can clone, delete, or export (in a JSON format) your configuration from the context menu in this configurations list.

General Tab

General TabGeneral TabGeneral Tab

The General tab allows you to configure the basic settings for your alternative tree, such as:

  • The Name of the tree (mandatory) in the Datahub tree view - this name will also be used for naming your alternative tree in the accordion menu if you leave the Label field empty. This field does not allow the use of blank spaces.
  • A Label for naming your alternative tree in the accordion menu, the configurations list, and the configuration tab.
  • A Description for your configuration - please note that this description will not be displayed in the tree.
  • A Group to merge your configuration with others in a folder in the configurations list on the left. You must remove the group mention for each affiliated configuration to remove the folder.
  • The Icon that should appear next to your alternative tree name in the accordion menu. You can select an icon for your alternative tree tab in the dropdown menu or the Icon Library. To access a preview of the selected icon, click on the Refresh button. The default icon for an alternative element tree is the following: Default Icon for AETDefault Icon for AETDefault Icon for AET.

Display in Default Perspective

Using the Show in Default Perspective checkbox, you can decide if your tree should be displayed as an alternative view in the Default perspective of your instance. By default, this option is disabled.

caution

When adding an alternative element tree to the default perspective from the Perspective Editor, this Show in Default Perspective option will be ignored.

Allow Drag and Drop

The Allow drag and drop of elements checkbox allows you to decide whether it's possible to drag & drop elements within your alternative tree and from one of the standard element trees. Currently only objects are supported for drag and drop.

By dropping an element into the alternative element tree, the value in the object will be updated. Keep in mind that only simple data types are supported for drag and drop, like text, number, single select etc.

caution

If the alternative element tree configuration is built with the following fields, drag and drop will not be possible:

  • Relations (Any type of relation)
  • Multi-Selects (Country, Language, Standard Multi Select)
  • Date (Date, Date & Time, Time)

Data Source Tab

Data Source TabData Source TabData Source Tab

In the Data Source tab, you can choose the class used to construct your alternative tree and define the included data using workspaces. Thanks to the include checkbox, you can use the workspaces to exclude folders or elements.

You can also use a Precondition to filter the data that should be available in your new tree. You can, for example, decide to filter Data Objects on their attributes (e.g. for our demo sample to display only cars produced before 2000). The precondition options are predefined and can be extended according to your needs.

Tree Levels Tab

Tree Levels TabTree Levels TabTree Levels Tab

The tree levels are defined from the Data Objects' attributes. You can add a new level using the Add button, change its place using the arrows, or delete it by clicking the trash bin icon.

caution

Be aware that you must define at least one level to save your tree's configuration.

Supported Attributes and Data Types

The current version of the functionality supports the following attributes and data types:

  • Containers:

    • Data Object Class Attribute
    • Localized Data Object Class Attribute
    • Object Brick Attribute
  • Data Types:

    • Text
    • Number
    • Date
    • Select
    • Relation
    • Other (checkbox, color, calculated value)

For complex data types like Localized Field, Objectbrick, or Relation, you must select the language or field on which your tree level will be based. For a Relation attribute, you can choose the field via the dropdown menu as in the illustration above or use a Symfony Expression (e.g. for concatenating different fields).

Extending to New Attributes

The supported entities are expendables according to your needs using special adapters. Please refer to the following sections for more details:

Configuration Storage

The configuration utilizes the LocationAwareConfigRepository for storing the configuration. In the symfony tree the storage location can be configured. Following values are possible:

  • symfony-config - write configs as Symfony Config as YAML files to /var/config/alternative_object_trees/custom_object_tree.yaml
  • settings-store - write configs to the SettingsStore
  • disabled - do not allow to edit/write configs at all

Details also see Pimcore Docs.

Example

pimcore_backend_power_tools:
config_location:
alternative_object_trees:
write_target:
type: 'settings-store'
options:
directory: '/var/www/html/var/config/aet'