Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

How to get the properties of component added into child pages in its root page using sling model ?


Level 1
6 Replies


Level 4

If you know what property you are looking for in side all the child pages, then make an aem query with that property, which will return all nodes within the root node and you can read those properties in root page sling model



Level 1

Use case is first I have to create 3-4 Blog Pages which will have a Blog Component, using this blog component i will add title, author name, and whole blog description, once i create all the child pages using Blog component, these all child pages will have a Parent Page, we have to fetch the Blog Component properties (title, authorName, short description) in parent page in a form of Blog Cards.

For understanding please check the attached images

1) Parent page with all blog cardsParent Page.png

2) child page (a complete blog)Child blog page 1.png


Level 5

@msgavali111 Using Querybuilder with the component's sling:resourceType you are looking for under rootpage, you will get the list of resources with which you can get hold of properties that you want.



property.value=<component's resourceType that you are looking for>



Hope this helps,


Level 1

thank you so much @krishna_sai , i am trying to go with that approach only, actually i am fresher to in AEM, can you please check the above use case .


Level 5

@msgavali111 This works for your scenario. you can do this logic in your blog cards component slingmodel.



Level 3

Hi @msgavali111 ,

You need to run a query through code where you will be providing the base path and resource type you are looking for. In your case, you want to take child pages so you can provide current Page path as base path. Take a reference of this-->

After you get the results, loop through the results and adapt it with resource and get required title, description, and other properties of component. In this way, you can achieve the functionality.