How to fetch the child pages & grand child pages by using recursive method in SIGHTLY.(I already have the object which contains the list of pages from the sling model class)

Avatar

Avatar
Validate 1
Level 1
Junnu_ravali
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Junnu_ravali
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
Junnu_ravali
Level 1

01-06-2021

I have an object which contains all the list of child pages & grand child pages (object - brought from the sling model class). In the component html page, I want to write the code , which display all the parent and child/grand child pages using the RECURSIVE method.

 

View Entire Topic

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,444 likes

Total Posts

3,327 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,444 likes

Total Posts

3,327 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

01-06-2021

Hi,

I would suggest returning the list of pages from the sling model itself.

Using HTL for this use case could be tricky.