내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

Search for three most recent modified pages from a location [say /content/test] and populate three components which just have a pathfield in it.

Avatar

Level 9

Hi All,

1] I am able to somehow handle scenario #1[i.e, search for recent modified pages in a given location]

2] However, I am not sure how to populate the pages returned into three separate components[which just have a path field in it] 

Any thoughts/pointers on this will be helpful.

4 답변 개

Avatar

Level 10

you want th result set to show up in three components? Where are the three compoents located? Also, where do you invoke the query from?

Avatar

Level 7

Hi,

This should be  a straight forward solution. Just write a scheduler or service based on your bussiness requirement. Then fire the query, get the pages and modify/populate components using JCR API. 

Thanks

Tuhin

Avatar

Administrator

Hi 

You can create a service/component which will query JCR for Last modified pages (Via JCR API, Query manager API etc).

You can use this result in modifying/Adding Default value to component dialog pathfield.

Reference article for Querying:-

Link:- https://helpx.adobe.com/experience-manager/using/querying-experience-manager-data-using1.html

Link:- https://helpx.adobe.com/experience-manager/using/using-query-builder-api1.html

Link:- https://hashimkhan.in/2015/12/02/query-builder/

Link:- http://aemcq5.blogspot.in/2014/11/cq5-querybuilder-simplified.html

 

Reference article to fill default values:

Link:- http://blogs.adobe.com/dekesmith/2012/10/05/setting-default-values-on-cq-components/

Link:- http://stackoverflow.com/questions/27059863/cq5-dynamically-set-defaultvalue-in-components-dialog-us...

Link:- https://myprogressivelearning.wordpress.com/2015/01/21/setting-default-value-to-the-drop-down-of-dia...

 

I hope this would be of some use to you.

Thanks and Regards

Kautuk Sahni

 

 



Kautuk Sahni

Avatar

Level 9

Hi Scott,

Thank you for your reply.

Based on the path selected in the components pathfield, we are taking querybuilder approach to get the results.

Yes, there should be three similar components[each one with just pathfiled in it] on the page and the pages returned should get populated in the pathfield of these three components.