list.Reverse(list : list) : list
Reverse the entries in a list.
1.9.1 or later
| Name | Type | Description |
| list | list | The list value. |
a reverse ordered list of the original list.
| Output | ||
| [ 3, 2, 1 ] |
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by
var page = wiki.getpage( '/Committees_and_Task_Forces/Educational_Technology_Committee/Minutes' );
if( #map.values( page.files ) == 0 )
{
web.html( "<p>No files are attached to page " .. page.name .. "</p>" );
}
else {
foreach( var file in list.reverse(map.values( page.files ),'name'))
{
web.html(
"<p>" ..
"<a href='" .. file.uri .. "'>" .. file.name .. "</a><br />" ..
"</p>"
);
}
}
and got very weird results, but not a reverse order list of the files attached to the page.
var page = wiki.getpage( '/Committees_and_Task_Forces/Educational_Technology_Committee/Minutes' );
if(!#page.files) {
<p> "No files are attached to page " .. page.name; </p>
} else {
foreach(var file in list.sort(map.values( page.files ),'name')) {
<p> web.link(file.uri, file.name) </p>
}
} edited 06:38, 30 Jun 2011