Hey everyone,
I'm looking to incorporate a personalized checkbox into the link sharing user interface.
At the moment, there's a traffic rule filter restricting access to the shared link based on a specific IP.
Now, I need to introduce a checkbox that can deactivate this filter for a particular asset, enabling access from any location.
Any guidance or insights on implementing this feature would be greatly appreciated!
Im on AEM as a Cloud Service.
Thanks in advance.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
I hope you are familiar with how AEM project structure differs in crx de and your repo, if you are not you can visit:
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/develo...
Similar to the crx de, you have to make the same structure (according to AEM project structure in a repo) in your repo. Once the structure is made, you can edit the .content.xml file (present inside yourcomponentname > _cq_dialog ) and add the checkbox there via code.
Match the properties of the other .content.xml file (present inside yourcomponentname folder) using crx de in your repo.
If the new hierarchy in your repo is different from your project's usual structure you also have to make entry of the same path in the META-INF > vault > filter.xml in your repo.
On deploying the code, you shall see the same and exact structure in crx de when you manually overlayed the component via crx de.
Hi @mrvnaz you can implement this feature using the following steps:
1. Look for the link sharing component in the crx de and use the concept of overlaying/overriding to add a checkbox in it.
2. Look for the code (component/service/configuration/servlet) responsible for the traffic rule filtering.
3. Make a custom servlet and get the value of the checkbox from the model. Based on the value, you can enable or disable the traffic rule filtering.
First of all, thanks for the answer.
I am relatively new to AEM, so I still have a few questions.
When I try to overlay the link share component in CRXDE, I only get an error (because libs are read-only).
Can I recreate the structure manually?
And where can I find the path "component/service/configuration/servlet" ?
Thanks in advance
To learn more about overlaying/overriding you can visit:
https://www.aem-blog.com/post/override-and-overlay
If this doesn't work for you, check if you have the required permissions.
Also, "component/service/configuration/servlet" is not a path. The code for traffic rule filtering in AEM could be in any form i.e it could be in form of a component or it could be a java code in a servlet or it could be a configuration from a service. If there's something like that there must be a way to switch it on or off. You can override that code.
If there's no way, you can try making a custom servlet and try to enable and disable it using java (if it's possible) based on the checkbox value.
Note: If the rules are set via a text file like .yaml or in dispatcher.any file, there might be no way you can handle the traffic rule filtering using a checkbox. In that case, manipulating the file content is the only way to control it.
Thanks, I tried to overlay the checkbox in my local environment.
So far it works, but since I will need it later in our production environment, I should be able to do it there as well. Is there any way to do this via the repo?
I hope you are familiar with how AEM project structure differs in crx de and your repo, if you are not you can visit:
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/develo...
Similar to the crx de, you have to make the same structure (according to AEM project structure in a repo) in your repo. Once the structure is made, you can edit the .content.xml file (present inside yourcomponentname > _cq_dialog ) and add the checkbox there via code.
Match the properties of the other .content.xml file (present inside yourcomponentname folder) using crx de in your repo.
If the new hierarchy in your repo is different from your project's usual structure you also have to make entry of the same path in the META-INF > vault > filter.xml in your repo.
On deploying the code, you shall see the same and exact structure in crx de when you manually overlayed the component via crx de.