Expand my Community achievements bar.

SOLVED

Allowed parents/ allowed children are these properties applicable for component

Avatar

Level 2

allowedParents / allowedChildren restrictions just don't work for Components. Is it for template level only?

Can you please share the example where we can use allowchildren property at component level.

1 Accepted Solution

Avatar

Correct answer by
Employee

template level only..

View solution in original post

5 Replies

Avatar

Correct answer by
Employee

template level only..

Avatar

Level 4

Hi, Dev

Yes, it is for templates only. 

Please read through this documentation for further details. 

https://docs.adobe.com/docs/en/aem/6-2/develop/templates/page-templates-static.html

Thanks,

Vamsi

Avatar

Level 2

But in Adobe docs its written for component too

https://docs.adobe.com/docs/en/cq/5-5/developing/components.html

      

allowedChildren 

 String[]

Path of a component that is allowed to be a child of this component.

 

Avatar

Level 2

But in adobe doc its written for component too

https://docs.adobe.com/docs/en/cq/5-5/developing/components.html

      

allowedChildren 

 String[]

Path of a component that is allowed to be a child of this component.

 

Avatar

Level 4

AEM 6.2, 6.3, 6.4

(doc: Custom Node Types )

cq:Component

  • @prop allowedParents
    Regular expression patterns to determine the path(s) of components that are allowed as parent components.
  • @prop allowedChildren
    Regular expression patterns to determine the path(s) of components that are allowed as child components.

About older versions I don't know, maybe don't support this.

Also, I've tried to use these properties on AEM 6.4 project and it didn't work for components. So, maybe the documentation is wrong.