To load the clientlibs files via a page property dialog | Community
Skip to main content
April 10, 2024
Solved

To load the clientlibs files via a page property dialog

  • April 10, 2024
  • 1 reply
  • 414 views

I have created a custom experience fragment template type and using that template type have created an experience fragment template also. Both of this template refers to a node which has a dialog to add the certain JS & CSS in the XF. This node has a property- checked whose value is true by default but despite of that, files are not loading. 
When i go to the page properties and simply do the save & close, it gets loaded. 

When checked in the crx/de, i found that in the master.html node, the property is not getting generated itself. 

The requirement is to load the property by default when the property is checked without manually saving it. I need the solution for the same without using the sling model.

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 arunpatidar

Hi @aishwaryakh1 
You can add default property value of checkbox in initial node, so that when XF is created using your template, the property is available by default.

 

Example of initial node : https://github.com/arunpatidar02/aemaacs-aemlab/blob/e31fc62bfd147e56ecaca740c6e2739c66c75f75/ui.content/src/main/content/jcr_root/conf/aemlab/oneweb/settings/wcm/templates/xf-web-variation/initial/.content.xml#L13 

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
April 10, 2024

Hi @aishwaryakh1 
You can add default property value of checkbox in initial node, so that when XF is created using your template, the property is available by default.

 

Example of initial node : https://github.com/arunpatidar02/aemaacs-aemlab/blob/e31fc62bfd147e56ecaca740c6e2739c66c75f75/ui.content/src/main/content/jcr_root/conf/aemlab/oneweb/settings/wcm/templates/xf-web-variation/initial/.content.xml#L13 

Arun Patidar