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

Add the possibility to ignore pinned pages when sorting document tree macro results

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • None
    • Unknown

    Description

      The possibility to sort document tree pages using different fields (nametitledate , creationDate) and different orders (esc, desc) has been recently implemented, see XWIKI-21155. And as it is implemented now this feature takes in consideration the pinned pages when ordering the macro results, so, it could be a good improvement if we have an option to force ignore pinned pages and manual order already applied on a given document tree.

      Here is an illustrative example of the need.

      • On an XWiki instance create a page named "Test" with 5 sub pages "Test 1", "Test 2", "Test 3", "Test 4", and "Test 5"
      • By default these pages are ordered by their title in ascending order, see screenshot :
      • Administer the "Test" page and add the "Page 3" to the pinned pages, now the "Page 3" is displayed first in the document tree, see screenshot
      • Now, on another page use the documentTree macro to display the "Test" page tree sorted by title in descending order.
      {{documentTree root="document:Test.WebHome" sortDocumentsBy="title:desc"/}} 
      • You can see that the order of the page changed but the "Page 3" is still displayed first, see screenshot

      Currently there is no possibility to display the pages in their real title ascending order ("Page 1", "Page 2", "Page 3", "Page 4", "Page 5"), so, we need a parameter in the documentTree macro that allows ignoring pinned pages and manual order when sorting the pages.

      Attachments

        1. pages-default-order.png
          45 kB
          Mohamed Boussaa
        2. pages-default-order-with-pinned-pages.png
          44 kB
          Mohamed Boussaa
        3. pages-desc-order.png
          48 kB
          Mohamed Boussaa

        Activity

          People

            Unassigned Unassigned
            mouhb Mohamed Boussaa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: