Highlighted

Dynamic Template | AEM 6.4

rohanh72647668

14-02-2019

Hi,

I created a dynamic template under /conf/<template-name>/settings/wcm. And it is working properly. In order to create a page with this template in my project, i have given the path (/conf/<template-name>/settings/wcm/templates/<template-name>) to cq:allowedTemplates property in page properties of a desired hierarchy. But it is not showing in siteadmin or sites.html option when creating a page.

Please suggest some solution or any configuration that i might be missing.

arunpatidar26

Thanks,
Rohan

Replies

Highlighted

Gaurav-Behl

MVP

14-02-2019

Did you apply 'cq:conf' property on the root page pointing to your /conf/<site> path ?

Another thing, if you've multiple templates in /conf then use a regex  /conf/<site>/settings/wcm/templates/* for cq:allowedTemplates

Is that template active/enabled?

Highlighted

rohanh72647668

15-02-2019

Thanks for the speedy response.

Template is enabled as I can see the property (status) as enabled.

I have included property cq:conf with value /conf/<my-folder-name> at jcr:content of a page where I should be able to create page with this template.

I have also included template path (/conf/<my-folder-name>/settings/wcm/templates/<template-name> in cq:allowedTemplates at jcr:content of page.

But still the option to create in siteadmin is not coming.

Should we allow this dynamic template in our project template with property (allowedChildren) ? P.S - I have tried that too.

Thanks,

Rohan

Highlighted

Gaurav-Behl

MVP

15-02-2019

I just tested with just these two configurations pointing to 'we-retail' on a random root page and I was able to create a page and it worked fine.

Could you share relevant screenshots?

If you use only single template then you would get only one option as template to create a page from within siteadmin modal.

Highlighted

perfecci0nista

15-02-2019

Do we need cq:conf property or is it optional. I dont see that on my root page and I am able to create page with my new template.

Highlighted

Gaurav-Behl

MVP

15-02-2019

you would still be able to create a page without using cq:conf property on root because you are directly pointing to your template path be it anywhere in the repo but for a true 'context aware' setup, you'd need this property

check -

Apache Sling :: Apache Sling Context-Aware Configuration

AEM /conf and ConfMgr - Adobe Experience Manager | AEM/CQ | Apache Sling

Highlighted

smacdonald2008

15-02-2019

Follow this article to learn how to create Editable Templates and pages based on them.

Adobe Experience Manager Help | Creating an Adobe Experience Manager 6.4 website using Editable Temp...

You can watch these short videos too:

Scott's Digital Community: Guided Journey for Using Adobe Experience Manager Core Components

Both of these show you how to create pages from editable templates.

Once you create an editable template and enable it (as shown in these links) - you can create pages.

When you read this article and watch the videos - you will see no need to set the props you are referring to create pages on editable templates.