This is a design sketch for improvements to the ListPages module. Since we aim to always keep backwards compatibility, these are all new features, rather than changes to existing features.
Site selector (for CSL, Cross Site ListPages):
Cluster selector:
Backlink selector:
Updated-at selector:
Created-at selector:
Contains selector:
Name selector:
Order criteria:
Property | Meaning |
---|---|
parent | Order by parent name |
activity | Order by date of last activity on page |
children | Order by number of children |
watchers | Order by number of watchers |
The activity order is the last date of comment, edit, file upload, tagging, rename, or parent change.
The header and footer are output only if there is at least one item in the list. They replace prependLine and appendLine which are deprecated.
Following http://blog.wikidot.com/design:17, header and footer can be passed in the body of the module as follows:
[[module ListPages]]
==== header
[[table style="border: 1px solid #000"]]
[[row]]
[[cell]]
Page name
[[/cell]
[[cell]]
Author
[[/cell]
[[/row]]
==== footer
[[/table]]
====
[[row]]
[[cell]]
%%fullname%%
[[/cell]
[[cell]]
%%created_by_linked%%
[[/cell]
[[/row]]
[[/module]]
Property | Meaning |
---|---|
Page structure | |
%%field{name}%% | Field value from page data form |
%%field_raw{name}%% | For select fields, the internal value |
Page reporting | |
%%views%% | Number of times page has been viewed |
%%watchers%% | Number of watchers on page |
%%history%% | Summary of last edits to page |
%%hidden%% | True if page is hidden (Boolean) |
%%locked%% | True if page is locked (Boolean) |
Current context | |
%%user%% | Current logged user name if any, else "anonymous" |
%%user_linked%% | Icon and link to current logged user, if any |
%%user_status%% | Returns anonymous, member, moderator, administrator or master-administrator |
%%now%% | Current date taking into account site UTC +- settings |
%%this%% | Current relative URL including all arguments |
%%this_name%% | Page name without category |
%%this_fullname%% | page full name |
%%this_title%% | Page title |
%%this_parent%% | Page parent (for sibling detection) |
Page visualization | |
%%parity%% | "odd" or "even", used to generate CSS classes |
Output formatting:
What will this order criterion do with pages that haven't been commented on?
I think it uses created_at as the commented_at value, in that situation.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
How is %%this_name%% any different to %%name%%
And how is %%this_fullname%% any different to %%fullname%%
etc?
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
I assume you mean how is %%this_fullname%% different to %%page_fullname%%?
'this' refers to the page containing the ListPages, while 'name' refers to the page being listed. In live templates, 'this_fullname' and 'fullname' are the same. In ListPages, they are not except if the current page is itself being listed.
The main reason for the 'this' variables is to allow construction of URLs back to the same page.
Portfolio
You're right, made a mistake — post fixed :)
That makes more sense.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)