Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • jcrNodeFromLocationProvider - Resolves node content from the current location.
  • jcrGetCurrentNodejcrGetCurrentNodeProvider -  Returns the parent node.
  • jcrGetChildNodejcrGetChildNodeProvider -  Resolves child JCR node from the parent.
  • jsonProvider - Usable mainly in REST -related contexts, for example in client definitions of the REST Client module, it replaces the {id} path parameter with the one passed in the location and then fetches the result using a configured REST call.

The jcrGetCurrentNode and jcrGetChildNode providers are jcrGetCurrentNodeProvider and jcrGetChildNodeProvider are suitable for sub forms only since a dependency on a parent node is presupposed to exist.

...

Code Block
languageyml
linenumberstrue
        address:
          label: address
          i18n: true
          $type: compositeField
          itemProvider:
            $type: fetchJcrSubNodeProviderjcrChildNodeProvider
          properties:
            city:
              label: city
              $type: textField
            country:
              label: country
              i18n: true
              $type: textField

(A snippet of an existing full definition, see https://git.magnolia-cms.com/projects/MODULES/repos/contacts-app/browse/src/main/resources/contacts/apps/contacts-v8.yaml#320-336.)

Using the fetchJcrSubNodeProviderjcrChildNodeProvider resolves the content of the child items city and country from the parent address:

...