editable templates and component policies | Community
Skip to main content
jayv25585659
Level 8
July 10, 2024
Solved

editable templates and component policies

  • July 10, 2024
  • 1 reply
  • 1420 views

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.

 

 

 

 

 

 

 

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"/>

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

@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.

 

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

 

 

 

 

1 reply

aanchal-sikka
Community Advisor
Community Advisor
July 10, 2024

@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
jayv25585659
Level 8
July 10, 2024

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

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
July 10, 2024

@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.

 

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

 

 

 

 

Aanchal Sikka