storing custom data in AEM 6.1 JCR repository

2019-09-10 03:18发布

We just got AEM 6.1, and went through developer training, as well. I am coming from another CMS background (Sharepoint) and wanted to learn / know, if i need to create a list to store data into it, and refer that programatically, somewhere on the page or other common libraries in my project , how do i do that and where do i store the data , is that in the /etc folder. Not clear, I guess, what i learnt from the training is that data is stored in node types as Key / Value pair, so for example if i had a list of movies that with attributes such as date released, actors, awards etc. how do i store that information in AEM, i don't want to store this as a part of the list component of the page. let me know if my question is vague, as i said, i am transitioning form another CMS. Thanks in advance.

I would also appreciate any pointers to blogs, etc..

标签: aem
1条回答
兄弟一词,经得起流年.
2楼-- · 2019-09-10 03:41

@Rahul Where to store data? Data can be stored in both the /etc folder and /content folder. Folders in /etc are usually used to supplement the application's business logic code development, for eg. clientlibs folder is used to store client side code(website styling, scripts etc.
The content folder is where the authored content, user generated content gets persisted as key value pairs and you will have to build a logic using jcr api's to retrieve this data from content nodes. You usually use core java to build this logic, if you want data from multiple nodes you can loop through the nodes and populate a data structure with the content, if you require data from a single node you can retrieve it to a variable, it is all upto the programmer and the business scenario involved. Here is an article which describes how to access content from CQ. https://helpx.adobe.com/experience-manager/using/programmatically-accessing-cq-content-using.html

查看更多
登录 后发表回答