Project

General

Profile

Actions

Feature #31215

open

Macro child_pages should support reverse order

Feature #31215: Macro child_pages should support reverse order

Added by Miodrag Milic over 7 years ago. Updated 10 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Resolution:

Description

This is more appropriate for some contexts, for example monthly reports which you want sorted chronologically in reversed order

Example:

`{{child_pages(reverse, depth=2) }}`


Files

reverse.patch (1.51 KB) reverse.patch F. P., 2021-06-29 11:36
reverse.patch (1.51 KB) reverse.patch F. P., 2023-03-23 13:56

Updated by F. P. over 6 years ago Actions #1

+1

This is very helpful when storing documentation/protocols in a wiki. Atm one has to scroll down a lot when there are lots of entries. We tried Documents, but there is no changelog.

Updated by Go MAEDA over 6 years ago Actions #2

  • Category set to Text formatting

Updated by F. P. over 5 years ago Actions #3

First: I'm no ruby developer.

I tried to extend the child_pages macro with the suggested reverse argument.

I would be glad if someone could:

  • check if the code is sane
  • test this in a development setup

Patch is attached. If I can do something else please point me in the right direction.

Updated by F. P. over 3 years ago Actions #4

I had the opportunity to ask a colleague that knows ruby to review my patch. The attached updated patch is working fine in our 5.0.3 install.
Just in case someone wants to use it.

Updated by F. P. almost 2 years ago Actions #5

The changes still work in 6.0.3.
I applied the changes manually, because the macros.rb changed.

Updated by F. P. 10 months ago Actions #6

The changes still work in 6.1.1.
I applied the changes manually.

Actions

Also available in: PDF Atom