Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allowed parents and Allowed children property in CQ template

Tags:

aem

What is the purpose of allowed parents and allowed children property while creating a cq template? The description in documentation simply says "Path of a component that is allowed to be a parent of this component"/"Path of a component that is allowed to be a child of this component". What is the importance of these properties?

like image 519
Jai Avatar asked Apr 07 '15 09:04

Jai


1 Answers

These properties allows you to set some contract of structure of pages in you project. For example: you have 3 templates (and corresponding pages with this templates):

  • template-1: allowedChildren="[template-2]"
  • template-2: allowedChildren="[template-3]"
  • template-3: allowedChildren="[]"

Then in siteadmin, you will be able to create:

  • under page with template "template-1" only pages with template "template-2",
  • under page with template "template-2" only pages with template "template-3",
  • under page with template "template-3" you will not be able to create any page.
like image 101
Oleksandr Tarasenko Avatar answered Sep 19 '22 05:09

Oleksandr Tarasenko