12 - ListPages Improvements
nav_first.pngFirst: design:1
1 - Rate Module
Edited: 29 Apr 2012 00:01 by: GoVegan
Comments: 21
Tags:
nav_prev.pngPrevious: design:11
11 - The Wikidot Data Model
Edited: 26 Oct 2009 01:12 by: leiger
Comments: 4
Tags:
Last: design:32
32 - Parenthood Module
Edited: 11 Nov 2009 21:47 by: Steven Heynderickx
Comments: 7
Tags:
nav_last.png
Next: design:13
13 - Private Module
Edited: 11 Nov 2009 21:58 by: Steven Heynderickx
Comments: 1
Tags:
nav_next.png

12 - ListPages Improvements
Created on 24 Sep 2009 09:53
By pieterh

rating: +4+x
This is the Redirect module that redirects the browser directly to the "http://projects.wikidot.com/thread:120" page.

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.

Selectors

Site selector (for CSL, Cross Site ListPages):

  • Select by site: site="site-selector"
  • Specifies a wikidot.com subdomain, a full domain, or a custom domain.
  • The site must be public and (eventually) be configured as a valid CSL source.

Cluster selector:

  • Select by cluster: cluster="cluster-name"
  • See cluster concept of data model.
  • Clusters are not yet implemented.

Backlink selector:

  • Select by backlink: backlink="backlink-selector"
  • "-" means pages with no backlink (i.e. orphaned pages)
  • Else specifies a list of space/comma delimited category:page values

Updated-at selector:

  • Select by last editor: updated_by="updated-by-selector"
  • "=" means by created by author of current page
  • "-=" means by not created by author of current page
  • Else, a single user name

Created-at selector:

  • Selector takes into account UTC+- site settings (new site manager setting)

Contains selector:

  • Select by last-updated content: contains="contains-selector"
  • Single string or regular expression
  • Searches first X characters of content
  • Possibly extended to searching specific content sections

Name selector:

  • Select by page name: name="name-selector"
  • Specifies a list of space/comma delimited page names
  • If no category specified, intersected with category selector

List ordering

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.

Header and Footer

  • header="wiki text"
  • footer="wiki text"

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]]

Page properties

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:

  • %%property-name(n)%% - truncates the property to a maximum of 'n' characters. Applies to all string properties.
  • %%property-name?value%% - provide default value if property name is empty. Applies to all string properties. Value may not contain wiki text. It can be wrapped in single or double quotes.
  • %%property-name?trueval:falseval%% - if property is non-zero or true, show trueval, else show falseval. Applies to all numeric and Boolean properties. Trueval and falseval may not contain wiki text. They can be wrapped in single or double quotes.
  • %%property-name|url%% - format string as valid URL (e.g. replacing spaces by %20). Applies to all string properties.
  • %%property-name|UC%% - format string as uppercase. Applies to all string properties.

Comments: 5

Add a New Comment