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

Explain what the 'variations' property does

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Neutral Neutral
    • None
    • None
    • None

      Hi there,

      I just stumbled uppon this template definition property:

      variations optional
      Merges template definition with the variation having the same name of the channel - if available.

      Technically it resides in info.magnolia.rendering.template.RenderableDefinition, but again the Java code is not documented at all.

      "Merges template definition with the variation having the same name of the channel - if available."

      • the variation: What is "the variation"? If it's set to a valid templateDefintion, is the current file also valid?
        • // Is this a valid templateDefinition?
          variations:
            validTemplateDefinition: /module-name/path/to/template-definition
      • the same name: what name is supposed to be the same?
        • Does the variation's .yaml-file have to be named exactly as the referenced one?
      • the channel: what channel? Is this property only related to personalization variations?
      • if available: how can I check, if the channel is available? What happens, if it's not available?

      It would be really helpful to understand the intent behind these variations, maybe with a use-case example. Is it an alternative to the !include mechanism in yamls?

      Best
      Tobias

        Acceptance criteria

              akhamis Ashraf Khamis
              tszczepanski Tobias Szczepanski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: