Expand my Community achievements bar.

SOLVED

How can I get the list of pages in a folder?

Avatar

Level 3

Hi,

I want to have the list of pages of news in news folder. I want to return the title & date of created time sorted one.

I need a limit number in order to return those # of news pages information. I have a dialog which has 2 field: Path of news & limit number;

    String parentPage = properties.get("parentPage", currentPage.getPath());
    // this one shows me the path parentPage: /content/ci/news

   (I am not sure how to write this part: TagManager tagM = resourceResolver.adaptTo(TagManager.class); )?!

   I tried with pagemanager which wasn't success.

Now, how should I return the list of pages in this path?

Thanks,

Bahareh

 

 


  

1 Accepted Solution

Avatar

Correct answer by
Level 10
1 Reply

Avatar

Correct answer by
Level 10

Here is a community article that addresses this use case:

http://labs.sixdimensions.com/blog/2012-08-05/select-pages-cq5-dialog/