It would be very useful to be able to sort pages by the most recently updated child. One use of this is in a no-comment forum, where threads should be ordered by the dates of the most recent comments. There are doubtless many other applications. If the pages are sorted by that date, then the date should be available for display and probably the name of the child page should be available too.
Design sketch
When a page is written or changed in any other way, it's (possibly new) parent page is passed the name of the changed page and the date of the change. The parent changes the contents of its variables as listed below. This constitutes a change to the parent page which will be propagated up to its parent and so on. It does not constitute a change in the page history.
One or two new database parameters are needed in the page table1:
- most-recently-updated-child
- A page table reference to the most recently updated child.
- most-recently-updated-child-date
- (optional) The date the most recently updated child was changed. It may be preferable to get this date by reference to the page table entry for the child, giving better data coherence at the expense of an extra database access.
New variables are available in ListPages and live templates as follows:
- %%child_updated_at%%
- The date of the most recent child change. This variable may be used in ListPages order and range parameters.
- %%child_updated_fullname%%
- The fullname of the most recently updated child.
- %%child_updated_unixname%%
- The unix name of the most recently updated child.
- %%child_updated_name%%
- The page name of the most recently updated child.
- %%child_updated_title%%
- The page title of the most recently updated child.
I believe I have requested this before — but don't have time to search for it.
Rated up. Definitely want this ;-)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server