Templates
New pages are normally created as copies of page templates in Composum Pages. Each page resource can be a page template, each site resource can be a site template. Templates are searched in the resource resolvers search paths - normally '/apps, '/libs' with the known overlay mechanism of the resource resolver.
Site Templates
If you want to create a new website it's a good idea to create a copy of a predefined site template. In the 'Create Site' dialog all available site templates are offered to make your choice.
If you create a new site using a template the structure of the template is copied to the parent you have chosen with the name specified in the create dialog. Each content page of the site template is also copied. The new site is referencing their site template and each copied page is referencing their page template to apply all rules specified in the template without copying these rules. If you change rules of a template the rules of each referrer of this template are changed.
Page Templates
If you want to create a new content page the hierarchy rules of the parents template are used to produce the list of allowed templates for child pages of the designated parent. This list is shown in the page create dialog and you can only choice one of the allowed templates from this list to create a new page.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cpp="http://sling.composum.com/pages/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="cpp:Page">
<jcr:content
jcr:primaryType="cpp:PageContent"
sling:resourceType="composum/pages/components/page"
jcr:description="A multi purpose content page with only one 'main' container to arrange content of all general element types including rows and columns."
jcr:title="Composum Site Content Page"
allowedChildTemplates="[
^(.*/)?ist/composum/templates/page/([^/]+|subsite/root)$,
^(.*/)?ist/composum/templates/blog/(root)$,
^(.*/)?pages/components/templates/page/(event|news)$,
^(.*/)?pages/options/.*/template(s(/page)?(/.+)?)?$
]">
<top
jcr:primaryType="cpp:Container"
sling:resourceType="composum/pages/components/container/parsys">
<cpp:design
jcr:primaryType="nt:unstructured"
sling:resourceType="composum/pages/stage/edit/page/design"
designRef="/apps/ist/composum/templates/page/design/top/cpp:design"/>
</top>
<main
jcr:primaryType="cpp:Container"
sling:resourceType="composum/pages/components/container/parsys">
<cpp:design
jcr:primaryType="nt:unstructured"
sling:resourceType="composum/pages/stage/edit/page/design"
designRef="/apps/ist/composum/templates/page/design/main/cpp:design"/>
</main>
<bottom
jcr:primaryType="cpp:Container"
sling:resourceType="composum/pages/components/container/iparsys">
<cpp:design
jcr:primaryType="nt:unstructured"
sling:resourceType="composum/pages/stage/edit/page/design"
designRef="/apps/ist/composum/templates/page/design/bottom/cpp:design"/>
</bottom>
<cpp:design
jcr:primaryType="nt:unstructured"
sling:resourceType="composum/pages/stage/edit/page/design"
designRef="/apps/ist/composum/templates/page/design/cpp:design"/>
</jcr:content>
</jcr:root>