Texas Tech College of Architecture
Personal tools

Help:Sorting Lists

From TTU College of Architecture

Jump to: navigation, search

An extension has be installed that allows lists to be sorted in alpha order. Additional information about the extension can be found at http://www.mediawiki.org/wiki/Extension:Sort


Contents

Usage

Sort adds a new tag, <sort>, to the MediaWiki markup, which can be inserted while editing. The syntax of this tag is

<sort order="[order]" class="[class]">
List item one
List item two
etc.
</sort>

The order and class attributes are optional, and are used to customise the sort direction and list type generated. By default, Sort will generate an alphabetically sorted unordered list. Each item in the list should go on a new line.

Wiki links can be used in list items, and existing list tokens will be trimmed from the start of the line.

Order

The following are valid order values

  • asc - ascending sort (default)
  • desc - descending sort

Class

The following are valid class values

  • ul - unordered [bulleted] list (default)
  • ol - ordered [numbered] list


Examples

The following code:
<sort order="asc" class="ul">
Zebras
Grapefruit
More stuff...
</sort>
Produces the following result:
  • Grapefruit
  • More stuff...
  • Zebras


The following code:
<sort order="asc" class="ol">
Zebras
Grapefruit
More stuff...
</sort>
Produces the following result:
  1. Grapefruit
  2. More stuff...
  3. Zebras