cq:AllowedTemplates not updated for existing pages | Adobe Higher Education
Skip to main content
souvikcmusic
Level 2
June 8, 2018
Resuelto

cq:AllowedTemplates not updated for existing pages

  • June 8, 2018
  • 3 respuestas
  • 3766 visualizaciones

Hi, 

I have noticed the following problem :

When we create a new page, the property “cq:allowedTemplates” with value from the template definition is created.

If the value of the property changes in template definitions, pages which are already created are not updated.

Do we have a solution for this?

We are using AEM 6.3 version

Thanks

Souvik

Este tema ha sido cerrado para respuestas.
Mejor respuesta de arunpatidar

Hi Souvik,

I think once the page is created from static template you can't update structure/properties.

You may need to write utility to update cq:allowedTemplates property in page.

You can take a reference from below tool, you can create something like GUI tool below or just use Node API to update properties

Resource Type/Template Updater

Thanks

Arun

3 respuestas

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorRespuesta
Community Advisor
June 8, 2018

Hi Souvik,

I think once the page is created from static template you can't update structure/properties.

You may need to write utility to update cq:allowedTemplates property in page.

You can take a reference from below tool, you can create something like GUI tool below or just use Node API to update properties

Resource Type/Template Updater

Thanks

Arun

Arun Patidar
June 9, 2018

Thank you for your response.

What about dynamic (editable) templates? How can we modify the list of allowed child templates for existing pages if they were created via Editable templates?

Best regards,

Ivan

arunpatidar
Community Advisor
Community Advisor
June 10, 2018

Hi,

you can add allowedChildren property in template and value is regular expression patterns to determine the path(s) to templates allowed as child templates.

e.g. I added allowedChildren= /conf/we-retail/settings/wcm/templates/hero-page in product-page template,

/conf/we-retail/settings/wcm/templates/product-page

Arun Patidar