-
Improvement
-
Resolution: Obsolete
-
Major
-
None
-
6.2.4
-
None
-
None
-
-
Empty show more show less
-
UI FW 32
-
3
Link field through version 6.2.3 defaults to ID. Starting in 6.2.4 it's back to path.
Old UI:
- linkField linked by default via path
- had to use a special class to link via UUID
identifierToPathConverter: class: info.magnolia.ui.form.field.converter.BaseIdentifierToPathConverter
New UI -> to Update
Link field through version 6.2.3 defaults to ID. Starting in 6.2.4 it's back to path (like the old UI).
This page should be updated explaining how to link via path:
https://documentation.magnolia-cms.com/display/DOCS62/Link+field
This solution is valid up until 6.2.4.
Solution:
Using this converterClass, coming form the default field properties:
https://documentation.magnolia-cms.com/display/DOCS62/_Common+field+properties
converterClass: info.magnolia.ui.editor.converter.JcrNodeToPathConverter
Linking via ID (default - no converter class):
targetPageLink: $type: linkField label: Page description: Choose a page to link to. chooser: workbenchChooser: appName: pages-app
Linking via Path(using converter class):
targetPageLink: $type: linkField label: Page description: Choose a page to link to. converterClass: info.magnolia.ui.editor.converter.JcrNodeToPathConverter chooser: workbenchChooser: appName: pages-app
Use case linking via Path:
Its more rare cases, sure. Linking via ID is the best in most cases, but:
- Importer that deleted and re-imports the same items nightly based into the same location/structure. As its only few items (<1000) its easier tot re-create them than writing delta updates of changed values.
=> Linking via path as the id of the nodes change. - Independent importers running on two (or more) public nodes and the author. Generated nodes will have different ID's. Having to set on the author a link needs via Path, that it matches the public data.
- Its functionality that was there up to <6.2, we can't remove it, customers might use it in various ways.
- is related to
-
MGNLUI-6126 LinkField: Error if linked by path but field expects ID and vice versa, and deleted target should not render field empty
- Closed