Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Best way to read all pages/nodes along with metadata and page properties under /content

Avatar

Level 4

Hi,

We have a requirement to read all nodes/pages under /content with their metadata and page properties.what is the best way to do this ? 

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

You should use the visitor pattern for this. There is a base class in the JCR API expressly for this purpose: TraversingItemVisitor.Default.

Regards,

Justin

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

Hi,

You should use the visitor pattern for this. There is a base class in the JCR API expressly for this purpose: TraversingItemVisitor.Default.

Regards,

Justin

Avatar

Level 4

Hi Justin, thanks for giving me the hint, can you please provide me a sample code or any adobe example post.