Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18449

Add API to get all descendants of a page, based on the reference hierarchy

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 12.10.4
    • Old Core
    • None
    • Unknown

    Description

      Currently there is an API called getChildren() and getChildrenReferences() in com.xpn.xwiki.api.Document , and they both fetch children of the document based on the old parent child relation (not on the page references, the "nested spaces" hierarchy) - see more here https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/ContentOrganization/NestedPagesMigration/#HHistory .

      There should be an API, probably in com.xpn.xwiki.api.Document as well, allowing to fetch descendants of a page based on the hierarchy, potentially with various parameters / configuration: only direct children, all descendants, etc.

      The only alternative today is making a query in the database, after having understood the database model of XWiki.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lucaa Anca Luca
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: