Expand my Community achievements bar.

SOLVED

editable templates and component policies

Avatar

Level 9

3 questions please

 

1. I find that the code repo can get old when people update component policies frequently. So I'm thinking of putting the changes into the code repo. thoughts on this?

 

2. I tried adding an additional style in the component policy in my code repo but the changes I made did NOT show up in CRX/DE. Is it better to do it first using touch UI and then import to code repo?

 

3. If I add a new style config in component+policy in template editor, where is it saved? I looked at the node for the policy in CRX/DE and I cannot find the find the new style there.

 

2024-07-10 17_33_47-Content Page - Apprentice Success and 30 more pages - Work - Microsoft​ Edge.jpg2024-07-10 17_34_37-Content Page - Apprentice Success and 30 more pages - Work - Microsoft​ Edge.jpg

 

 

 

 

 

 

thanks!


PS. the original dev set the policy in filter.xml to "merge" so any code deployment does not overwrite anything already there.

 

EDIT: I added these in my /conf/mysite/settings/wcm/policies and it did not show up in CRX/DE because of the filter "merge" policy. My worry with using "update" is that if users created their own styles there, I will overwrite it!

<item5
cq:styleClasses="black"
cq:styleId="1689555351167"
cq:styleLabel="black"
jcr:primaryType="nt:unstructured"/>
<item6
cq:styleClasses="green"
cq:styleId="1699535381267"
cq:styleLabel="black"
jcr:primaryType="nt:unstructured"/>

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@jayv25585659 

 

1. if content authors are making changes in the component policy, Is it better to import them first into the repo so I don't overwrite their changes once the code is deployed?

- Yes, please import them. This will also assure that the developer are working on the same policies as authors.

 

2. I edited my original post and added more info.

Please try using update in your local once. This will rule out if issue is with editing via UI v/s filters.

 

3. I added a new question. can you please reply as well. thanks

It is saved under policy

-> Visit template via CRXDE

-> Check the policy that is configured for the component.

aanchalsikka_0-1720606126315.png

 

-> The policy path is relative to your conf-tenant /conf/wknd/settings/wcm/policies

 

aanchalsikka_1-1720606193589.png

 

 

 


Aanchal Sikka

View solution in original post

3 Replies

Avatar

Community Advisor

@jayv25585659 

 

Question-1 isn't clear. Please elaborate

 

Question-2: When you would deploy to the server, it would be via codebase. So, it should have worked on local as well. Additionally, please change the policy to update and verify. 


Aanchal Sikka

Avatar

Level 9

1. if content authors are making changes in the component policy, Is it better to import them first into the repo so I don't overwrite their changes once the code is deployed?

 

2. I edited my original post and added more info.

 

3. I added a new question. can you please reply as well. thanks

Avatar

Correct answer by
Community Advisor

@jayv25585659 

 

1. if content authors are making changes in the component policy, Is it better to import them first into the repo so I don't overwrite their changes once the code is deployed?

- Yes, please import them. This will also assure that the developer are working on the same policies as authors.

 

2. I edited my original post and added more info.

Please try using update in your local once. This will rule out if issue is with editing via UI v/s filters.

 

3. I added a new question. can you please reply as well. thanks

It is saved under policy

-> Visit template via CRXDE

-> Check the policy that is configured for the component.

aanchalsikka_0-1720606126315.png

 

-> The policy path is relative to your conf-tenant /conf/wknd/settings/wcm/policies

 

aanchalsikka_1-1720606193589.png

 

 

 


Aanchal Sikka