The project code has a property called contentType set under the following path
/conf/<project>/settings/wcm/templates/<template_name>/initial/jcr:content
I am trying to update the value of the contentType but the changes are not getting updated in the aem instance after deploying the project in aem cloud.
Below is the initial page properties code for the template in the project before and after updating the contentType property:
Before:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root jcr:primaryType="cq:Page">
<jcr:content cq:template="<template_path>"
jcr:primaryType="cq:pageContent"
sling:resourceType="<page_component_path"
contentType="article">
</jcr:content>
</jcr:root>
After:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root jcr:primaryType="cq:Page">
<jcr:content cq:template="<template_path>"
jcr:primaryType="cq:pageContent"
sling:resourceType="<page_component_path"
contentType="">
</jcr:content>
</jcr:root>
Is there any way to update the contentType property in a template's initial page properties?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @T_101 ,
It might be due to the filter configuration of your project. Try updating the mode for /conf or template path to "replace" in the project's filter.xml and deploy. Should most certainly work.
Thanks,
Fani
Hi @T_101 ,
It might be due to the filter configuration of your project. Try updating the mode for /conf or template path to "replace" in the project's filter.xml and deploy. Should most certainly work.
Thanks,
Fani
But I see contentType=“” as empty so it’s getting the value changed
@DPrakashRaj : Can you share the filter.xml file here.
and can you confirm , what change you are expecting in initial properties .
contentType="article">
this is existing and you want to make it blank as below.
contentType="">
but after the code got deployed , the value is not getting updated as blank. is my understanding corect ?.
Hi @T_101 , Can you try updating the filter.xml for the template's filter path with mode as "update_properties" so that updated content / new content is taken and nothing is deleted.
Thanks,
Krishna
Views
Likes
Replies