Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCU-2498

Improve description of how to configure transformers in M6

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Neutral
    • None
    • 6.2
    • None

    Description

      Currently the nesting in the configuration section is incorrect in https://docs.magnolia-cms.com/product-docs/Templating/Dialog-definition/Field-definition/Magnolia-6-UI-ports-of-5-UI-field-transformer-classes.html.

      Specifically entries in the column https://git.magnolia-cms.com/projects/DOCUMENTATION/repos/product-docs/browse/modules/ROOT/pages/Templating/Dialog-definition/Field-definition/Magnolia-6-UI-ports-of-5-UI-field-transformer-classes.adoc?useDefaultHandler=true#55.

      The nesting should follow the configuration in examples, e.g. like this:

      Use

      *`info.magnolia.ui.editor.JcrChildNodeProvider` as itemProvider * and set its `supportI18N` property to `false`

      *The deprecated `info.magnolia.ui.editor.ByLexicographicallyIndexedChildNodes$Definition` as `entryResolution` * and set its `strict` property to `true`

      *The deprecated `info.magnolia.ui.editor.LexicographicallyIndexedJcrNodeOrderHandler$Definition` as `orderHandler`

      However, this is basically a wordy explanation of a configuration, which can simply be provided as a YAML like so:

          m6ConfigForDelegatingMultiValueSubnodeTransformer:
            $type: jcrMultiField
            itemProvider:
              $type: jcrChildNodeProvider
              supportI18N: false
            entryResolution:
              class: info.magnolia.ui.editor.MultiFieldEntryResolution$Definition
              strict: true
              propertyNameDecorator: info.magnolia.ui.field.AlwaysEmptyPrefixNameDecorator
            field:
              # here goes your multi field entry configuration

      We do this in the example section, but it is unnecessarily disjointed from the table. I think the examples would be much more useful right there in the table where the transformers are mapped to the human-language explanation. 

      Then one doesn't have to look into the examples, looking for which one is the one they are looking for by switching between M5 and M6, counting which field is the one they are looking for (this is something I had to do now as well when I was looking for the examples to copy here).

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              sdemocko Šimon Demočko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 40m
                  40m