Expandir minha barra de realizações na Comunidade.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.

SOLUCIONADO

Include multiple property to match in patterns | AEM Modernization Tool

Avatar

Community Advisor

I want to match more than just the sling:resourceType for a component which I want to convert. I want the component to be converted if and only if it the jcr:property , say "testProp" has the value "testValue".

If the property "testProp" has any other value then I don't want to convert the component. 

 

<patterns jcr:primaryType="nt:unstructured">
  <lead jcr:primaryType="nt:unstructured"
        sling:resourceType="geometrixx/components/lead"
        testProp="testValue">
  </lead>
</patterns>

 

This pattern is matching with sling:resourceType, but not matching with testProp as I can see components which don't have testProp value as something else other than testValue are also showing up for conversion.

1 Solução aceita

Avatar

Resposta correta de
Community Advisor
<patterns jcr:primaryType="nt:unstructured">
   <lead
      jcr:primaryType="nt:unstructured" 
      sling:resourceType="geometrixx/components/lead" 
      testProp="testValue" >
   </lead>
</patterns>

This is the right way to match more than one properties.

When we search for the components with the pattern, all the components with the matching resource type will show up for conversion. 

Only the components which match the pattern exactly are going to be converted.

Ver solução na publicação original

1 Resposta

Avatar

Resposta correta de
Community Advisor
<patterns jcr:primaryType="nt:unstructured">
   <lead
      jcr:primaryType="nt:unstructured" 
      sling:resourceType="geometrixx/components/lead" 
      testProp="testValue" >
   </lead>
</patterns>

This is the right way to match more than one properties.

When we search for the components with the pattern, all the components with the matching resource type will show up for conversion. 

Only the components which match the pattern exactly are going to be converted.