Created
September 29, 2025 18:49
-
-
Save VivekSaha/2da4d4b896135d8ba4fc7e668d17a394 to your computer and use it in GitHub Desktop.
AEM - Custom component without dialog Code level
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Custom component without dialog:- Code level | |
| Step 1 - Create component folder "productdetails" | |
| e.g:- ui.apps\src\main\content\jcr_root\apps\aemgeeks\components\productdetails | |
| Step 2 - Create a ".content.xml" file | |
| e.g:- ui.apps\src\main\content\jcr_root\apps\aemgeeks\components\productdetails\.content.xml | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | |
| jcr:primaryType="cq:Component" | |
| jcr:title="Product Details" | |
| componentGroup="CustomComponents"/> | |
| Step 3 - Create a .html file with the same name of component "productdetails.html" | |
| e.g:- ui.apps\src\main\content\jcr_root\apps\aemgeeks\components\productdetails\productdetails.html | |
| <div class="product-details"> | |
| <h2>Product Title</h2> | |
| <p>Product short description.</p> | |
| </div> | |
| Step 4 - If there is no any dialog then create a "_cq_editConfig.xml" | |
| ui.apps\src\main\content\jcr_root\apps\aemgeeks\components\productdetails\_cq_editConfig.xml | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | |
| jcr:primaryType="cq:EditConfig"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment