This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-905ff927-17a0-4d96-a46e-4c417f737cb1 XWIKI-23010 Open

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

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-c5c68f94-b033-405d-8293-2bbea7ce907d Mohamed Boussaa created this issue on 20/Mar/25 11:37
 
Summary: Add the possibility to ignore pinned pages when sorting document tree macro pages
Issue Type: cid:jira-generated-image-avatar-905ff927-17a0-4d96-a46e-4c417f737cb1 Improvement
Assignee: Unassigned
Attachments: pages-default-order-with-pinned-pages.png, pages-default-order.png, pages-desc-order.png
Created: 20/Mar/25 11:37
Priority: cid:jira-generated-image-static-major-3418bbfd-2952-49a9-a89b-4c39ca2f4bfe Major
Reporter: Mohamed Boussaa
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. 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 :
  • 43416_pages-default-order.png
  • 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
  • 43417_pages-default-order-with-pinned-pages.png
  • 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
  • 43415_pages-desc-order.png

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.

 
 

2 updates

 
cid:jira-generated-image-avatar-c5c68f94-b033-405d-8293-2bbea7ce907d Changes by Mohamed Boussaa on 20/Mar/25 11:38
 
Summary: Add the possibility to ignore pinned pages when sorting document tree macro pages results
Description: The possibility to sort document tree pages using different fields ({{{}name{}}}, {{{}title{}}}, {{date}} , creationDate) and different orders (esc, desc) has been recently implemented, see XWIKI-21155. As 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 :
* !pages-default-order.png!
* 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
* !pages-default-order-with-pinned-pages.png!
* Now, on another page use the documentTree macro to display the "Test" page tree sorted by title in descending order.

{code:java}
{{documentTree root="document:Test.WebHome" sortDocumentsBy="title:desc"/}} {code}
* You can see that the order of the page changed but the "Page 3" is still displayed first, see screenshot
* !pages-desc-order.png!

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.