accesscontroltool icon indicating copy to clipboard operation
accesscontroltool copied to clipboard

Is it possible to use initialContent to write a multi / array property

Open LucaNerlich opened this issue 3 years ago • 0 comments

Hi, is it possible, to set multi value properties inside initialContent?

Ive got this variable map:

      - DEF useCaseTemplateMap=:
          crm:
            - /conf/myapp/settings/wcm/templates/c4c-fragment
          feedback:
            - /conf/myapp/settings/wcm/templates/c4c-fragment
            - /conf/myapp/settings/wcm/templates/c4c-feedback-xf

and im trying to set both values from feedback inside initialContent

                    - path: ${xfRootPath}/${brand}/${region}/feedback
                      initialContent: |
                        <jcr:root jcr:primaryType="sling:OrderedFolder" jcr:title="feedback" cq:allowedTemplates="[${useCaseTemplateMap['feedback']}]">
                        </jcr:root>

Using 'feedback' here (its a variable in my code), Id expect it to write both values from the map[feedback]. However, no values get written. A single value works fine, when removing the square brackets though.

LucaNerlich avatar Nov 18 '22 14:11 LucaNerlich