Oglala Lakota College Archives
There are two main ways to define the sort order entries are displayed - using the Sort Order metadata property or explicitly in a wiki tag. Both of these ways can specify one or more entry fields to sort on and a sort direction - ascending or descending.
Sort fields
The different entry sort fields are:
  • name - The entry name
  • fromdate, todate, createdate,changedate
  • entryorder - All entries have an integer entry order. See below
  • folder - This sorts "folder" like entries first
  • type - The entry type name
  • size - File size
  • number - this extracts the first numeric value in the entry name
Sort Order Property
There is a special Sort order metadata property that can be added to any entry.
  • Go to the "Add Properties" entry menu
  • Look for "Sort Order"
  • Specify the desired sort field and direction
images/sortorder.png?version=291
Note: you can configure a sort order for an entire tree of entries by checking on "Inherited". To define the default sort order for the entire repository add a Sort Order property to the top-level entry and check on "Inherited".
The "Or:" field in the above form allows you to define one or more comma separated sort fields, e.g.: the below would show all folders first, then sort by number then by name.
folder,number,name
You can add a "_up" or a "_down" suffix to the sort field to specify the sort order, e.g.:
folder_down,number_up,name
Sorting with Wiki Text
The default display of any entry can be overwritten with wiki text. Using this one can specify a sort order and other display components if desired. When editing the container entry (e.g., the entry that holds images) toggle on the checkbox. This enables the wiki text editor. See here for more details.

Once wiki text is enabled you can add the following wiki text if you wanted to set the sort order for a photo gallery:
+section title={{name}}
{{gallery  orderby="entryorder" ascending=true }} 
-section
This displays the children entries in a photo gallery and explicitly defines the sort order to be based on the entry order.

In general all of the "collection" tags, e.g. gallery, tabletree, map, links, tabs, etc can have their sort order set.

Note - the orderby can be any number of comma separated values, e.g.:
orderby="folder_down,number_up,name"
By default, the Sort Order property takes precedence over the sort order specified by the orderyby wiki attribute. To override this and always use the orderby wiki attribute add a "!" prefix to the orderby, e.g.:
orderby="!folder_down,number_up,name"
Examples
Sort by Date
For example, say you have a collection of images that are contained by a Photo Album entry. By default the Photo Album sorts its entries by date. So, one way to do this is to explicitly set the date on each Image entry.
Sort by Name
If you wanted to sort by name you can add a special "Sort Order" property to the Photo Album.
  • Go to the "Add Properties" entry menu
  • Look for "Sort Order"
  • Specify Name for the Field and Ascending=true
Entry Order
If you want to have an explicit sort order other than using date or name you can use the Entry Order field. All entries have a numeric entry order field. To set the entry order go to the Information page of the Photo Album. The Information page shows a list of the entries. The Order field is editable. Simply change the entry order - e.g. 1-999. Make sure you hit return in each field (The field will highlight in yellow when you hit return.
images/entryorder.png?version=291
You can click on the "Order" table header to sort on order to see the updated order:
images/entryorder2.png?version=291
Once you have the entry order set to the desired order go add (or edit) the Sort Order property as described above and set the field to be "Entry Order"